I am having array person of say 3 objects and form that i want to return objects named description. Now m using map to iterate over person, but what happens here is, if person is not having description then it returns undefined. I want at last to get array with only description objects(no undefined).
const person = [
{abc: 'abc',description:{}},
{qwe:'qwe', def:'def'},
{abcd: 'abcd',description:{}}
]
console.log(person.map(indivi => indivi.description))
filterbeforemap...