📅  最后修改于: 2022-03-11 15:04:03.138000             🧑  作者: Mango
//access value by using map
var personsInfo = {
company: 'sp-coder',
persons: [{
id: 1,
name: 'Adil'
}, {
id: 2,
name: 'Arif'
}]
};
const getNames = personsInfo.persons.map((data) => data.name);
console.log(getNames);
//Expected Output is [ 'Adil', 'Arif' ]