_.pick
Returns one or more objects omitting the defined keys
_.pick(keys, objects)
Parameters:
keys [string or array of strings]:
the keys to be picked
objects [object or array of objects]:
the objects that will have the keys that were defined picked
Example:
_.pick('age',[{name: 'drezzy', age: 17},{name: 'kau', age: 16}])
// => [{ age: 17 }, { age: 16 }]
Last updated