I am studying Javascript and trying to make the Map function print only the name. I try to do that but I did not succeed. I hope to find a solution for you. Thank you
const x = [{
a: {
name: "X",
age: "25"
},
b: {
name: "Y",
age: "30"
}
}]
Object.values(x).map((el) => {
console.log(Object.values(el).map((el2) => {
el2
}))
})