A javascript library for working with objects
Pulls values from an array of objects into a new array.
Param | Type | Description |
---|---|---|
array | Array |
Array of objects. |
path | string |
Dot delimited string of the path within each object. |
Example
import { pull } from 'object-agent';
const array = [{
a: { b: [1, 2, 3] }
}, {
a: { b: [4, 5, 6] }
}];
pull(array, 'a.b.1'); // => [2, 5]