npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

array-pluck

1.0.0 • Public • Published

array-pluck Build Status

Extract a list of property values from array with objects

Install the module with: npm install array-pluck

Example

var peoples = [
      { name: 'Fredrik', age: 22, favorites: { fruit: 'Pineapple' } },
      { name: 'Elli', age: 22, favorites: { fruit: 'Apple' } }
    ]
  , result = arrayPluck(peoples, 'favorites.fruit');
  
console.log(result); // ['Pineapple', 'Apple']

License

Copyright (c) 2014 Fredrik Forsmo
Licensed under the MIT license.

install

npm i array-pluck

Downloadsweekly downloads

6

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability