To use the pullAllBy function from the Lodash library in JavaScript, follow these steps:
index.tsx47 chars2 lines
pullAllBy function with three arguments:index.tsx211 chars6 lines
The first argument is the array from which you want to remove elements. The second argument is an array of values that should be removed. The third argument is the property name that should be used to compare elements.
In the example above, the pullAllBy function removes the first and third objects from the arr array, since they have x property values that are also present in the values array, and returns a new array with only the second object.
gistlibby LogSnag