deep-pick
Like lo-dash/underscore
.pick()
but recursively merges and picks deeply nested occurences of a property.
Install
npm
Install withnpm i deep-pick --save
Run tests
npm test
Usage
var deepPick = ;var obj = foo: a: 'a' bar: foo: b: 'b' baz: 'baz'; ;//=> {foo: {a: 'a', b: 'b'}}
options.value
Pass value: true
to return only the value for the specified property:
var obj = foo: a: 'a' bar: foo: b: 'b' baz: 'baz'; ;//=> {a: 'a', b: 'b'}
Author
Jon Schlinkert
Other javascript/node.js utils
Other projects that I maintain:
- arrayify-compact
- compact-object
- delete
- for-in
- for-own
- has-any
- has-value
- is-number
- is-plain-object
- mixin-deep
- mixin-object
- object-length
- omit-empty
- reduce-object
License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on September 22, 2014.