keyfinder
Deep search for keys in objects and arrays and pluck their respective values.
Install
$ npm install keyfinder --save
$ bower install keyfinder --save
Usage
keyfinder(object/array, "string")
Returns an array containing all the values of the keys that match the predicate.
var obj = a: 'aa' b: 'bb' c: 'cc' d: a: 'aaa' ;// → [ 'aa', 'aaa' ]
keyfinder(object/array, callback)
Iterates through the given object/array and calls the callback for every key/value pair.
// "obj" should be a JavaScript object or array.;
Tests
# clone this repo $ npm install$ npm test
License
MIT © Simon Johansson