How to destructuring nested object value in javascript?
const person = {
firstName: 'Adil',
lastName: 'Arif',
age: 25,
job: 'web-developer',
love: 'coding',
friedsList: {
friend1: 'Abir',
friend2: 'Adnan'
}
}
const { friend1, friend2 } = person.friedsList;
console.log(friend1, friend2);
//Expected output: Abir Adnan