I have an object like
let arr = [
{isManaged: true, id:1},
{isManaged: false, id:2},
{isManaged:false, id:3}
]
to get the values which are true, i do
arr.map(shift => ({
id: shift.id,
isPartnerManaged: shift.isManaged,
}))
but this will only return me the values where i true, now, I want to remove them from the array of objects. I tried to use the array.pop
but i don't know what index to feed it. Any ideeas?