I'm trying to remove object by key in JavaScript
here is example of array
{
Account Manager: {selected: true}
Arrival: {selected: true}
Client: {selected: true}
Client Contact: {selected: true}
Created: {selected: true}
Created by: {selected: true}
Departure: {selected: true}
Destination: {selected: true}
Keywords: {selected: true}
Status: {selected: true}
}
now i'm trying to remove status and client from this array but i don't know how to make it. I've tried with this:
for(var i=0; i<list.length; i++) {
if(list[i] == 'Status' || list[i] == 'Client') {
list.splice(i, 1);
}
}