Skip to content

Instantly share code, notes, and snippets.

@navarroaxel
Created May 2, 2014 15:38
Show Gist options
  • Save navarroaxel/9b4b2a6ec515c39abc1d to your computer and use it in GitHub Desktop.
Save navarroaxel/9b4b2a6ec515c39abc1d to your computer and use it in GitHub Desktop.
Example of pluck using UnderscoreJS
var stooges = [{name: 'moe', age: 40}, {name: 'larry', age: 50}, {name: 'curly', age: 60}];
var names = _.pluck(stooges, 'name');
// names => ["moe", "larry", "curly"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment