Here is an example of an array:
const appoint =[
{ a: "asas",
b:{au: false, h:false,l:true}
},
{ a: "avd",
b:{au: true, h:false,l:true}
},
{ a: "as", b:{au: true, h:false,l:false}
}];
My goal is to filter out falsy values when accessing property b. I attempted to achieve this using multiple map() functions like this:
const result = appoint.map(elem => elem.b.)
const finalresult = result.map(
item =>item.filter(
(item, value)=> item[value] === false )
)