I am new to Typescript, can you help me with this-
I have an array of objects, -
[{Name: a,
Age: 1
},
{Name: b,
Age: 2
}
]
I want an array which should be - [a, b]
I tried with the following but I am not getting the expected result-
for (int i=0; i< treeData.length; i++) {
finalArray.push(treeData[i][0]);
}
console.log(finalArray);
Can anyone please help me out. Thanks in advance..