I would like to convert a string array like that:
const arr = [
"name:Adam age:20 height:180cm",
"name:Sally age:30 height:170cm",
"name:Mike age:35 height:185cm",
"name:David age:40 height:190cm"
];
to this array that includes object with keys and values like that below:
var obj = [
{name:'Adam', age:20, height:'180cm'},
{name:'Sally', age:30, height:'170cm'},
{name:'Mike', age:35, height:'185cm'},
{name:'David', age:40, height:'190cm'}
];
Thanks!