42

What happened to pluck() in lodash version 4? What is a suitable replacement?

This syntax _.pluck(users, 'firstName'); is simple to me. Seems that _.map(users, function(user) { return user.firstName; } would do the trick but it's not nearly as neat.

Joe Hawkins
  • 9,803
  • 2
  • 21
  • 28

1 Answers1

69

Looks like _.map(users, 'firstName'); should cover it.

Joe Hawkins
  • 9,803
  • 2
  • 21
  • 28