I want to be able to remove an object from this object array individually by its key name. So if I wanted to remove item1 I would call a function or something similar and it would remove it completely.
var list = [{item1: 'Foo'}, {item2: 'Bar'}];
removeObjectByKeyName(item1);
I expect the object array after deletion to be [{item2: 'Bar'}]
Any help is appreciated. Thanks!