What happened to Lodash _.pluck? What happened to Lodash _.pluck? javascript javascript

What happened to Lodash _.pluck?


Ah-ha! The Lodash Changelog says it all...

"Removed _.pluck in favor of _.map with iteratee shorthand"

var objects = [{ 'a': 1 }, { 'a': 2 }];// in 3.10.1_.pluck(objects, 'a'); // → [1, 2]_.map(objects, 'a'); // → [1, 2]// in 4.0.0_.map(objects, 'a'); // → [1, 2]


There isn't a need for _.map or _.pluck since ES6 has taken off.

Here's an alternative using ES6 JavaScript:

clips.map(clip => clip.id)


Use _.map instead of _.pluck. In the latest version the _.pluck has been removed.