Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Latest commit

 

History

History
51 lines (41 loc) · 1.83 KB

pull.md

File metadata and controls

51 lines (41 loc) · 1.83 KB

Object Agent

A javascript library for working with objects

npm build coverage deps size vulnerabilities license


pull(array, path) ⇒ Array

Pulls values from an array of objects into a new array.

Param Type Description
array Array
path String Dot delimited string

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]