I have an array of objects that might look like this:
var arr = [{
a: 1,
b: 321,
c: 556,
d: 8
}, {
a: 1,
b: 22,
c: 21,
d: 8
}, {
a: 1,
b: 1,
c: 43,
d: 8
}, ];
and another list that could be:
var list = ['a', 'c', 'd'];
Since my list only has keys a, c, and d I want to get rid of all instances of the b key on my original array. All this procedure has to be dynamic though because There is no way for me to know what those keys might be prior to receiving them.
Is there a nice and clean way of doing this in JavaScript?