let data = [['Jack', 24], ['Sara', 23]] let y=[] var kv=data.map((n)=>{ for(let i in data){ var v=Object.values(n); } y.push( {name:v[0],age:v[1]}, ) }) console.log(y)