📅  最后修改于: 2022-03-11 15:04:28.078000             🧑  作者: Mango
var personsInfo = {
company: 'sp-coder',
persons: [{
id: 1,
name: 'Adil',
friedsList: {
friend1: 'Nabil',
friend2: 'Habib'
}
}, {
id: 2,
name: 'Arif',
friedsList: {
friend1: 'alvi',
friend2: 'avi'
}
}]
};
const { friend1, friend2 } = personsInfo.persons[0].friedsList;
console.log(friend1, friend2);
// Expected Output: Nabil Habib