lodash-pluckmany

0.0.4 • Public • Published

Just like pluck, except for multiple properties.

Usage

var users = [
    { 'user': 'barney', 'age': 36 },
    { 'user': 'fred',   'age': 40 }
];

_.pluckMany(users,'age','user');
// -> { 'age': 36, 'user': 'barney'  },
//    { 'age': 40, 'user': 'fred'    }

Credits

This is npm the packaged version of an answer found on StackOverflow by a user named nha:

http://stackoverflow.com/a/27514972/199263

Package Sidebar

Install

npm i lodash-pluckmany

Weekly Downloads

101

Version

0.0.4

License

none

Last publish

Collaborators

  • andreaspizsa