npm install pluck
pluck property path from arrays or an object.
component
``sh`
$ component install redventures/pluck
or
npm
`sh`
$ npm install pluck
Pluck from arrays.
`javascript
var pluck = require('pluck');
var firstName = pluck('name.first');
var items = [
{ name: { first: 'john', last: 'doe' } }
];
var names = firstName(items);
`
Pluck from simple objects.
`javascript
var pluck = require('pluck');
var item = {
name: {
first: 'john',
last: 'doe'
}
};
var name = firstName(item);
``
Creates the property lookup function.
MIT