The array to modify.
The values to remove.
The iteratee invoked per element.
Returns array
.
5.11.0
[[pull]], [[pullAll]], [[pullAllWith]], [[pullAt]], [[remove]], [[reject]]
const array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]
pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x')
console.log(array)
// => [{ 'x': 2 }]
This method is like
pullAll
except that it acceptsiteratee
which is invoked for each element ofarray
andvalues
to generate the criterion by which they're compared. The iteratee is invoked with one argument: (value).Note: Unlike
differenceBy
, this method mutatesarray
.