I have tried a lot of things but can't seem to get any of them to work as intended. Let's say I had something like the following.
{
_id: '12345',
name: 'John Smith',
job: [
{
title: 'Web Developer',
years: '12',
status: 'not active',
},
{
title: 'supervisor',
years: '15',
status: 'terminated',
},
{
title: 'lead developer',
years: '3',
status: 'not active',
},
{
title: 'Software Engineer',
years: '9',
status: 'active',
},
]
}
How can I remove the object with the status of 'terminated'? Also, would it be the same to remove all objects with that status of 'not active'?
Thanks.