/gist:6bc81a35e33dbcfcc1bc Secret
Last active
December 24, 2015 19:29
Star
You must be signed in to star a gist
Example of _.pluck method of underscoreJS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = [{tweet:"hello world", id:1}, {tweet:"this is awesome", id: 2}, {tweet: 'wow, this is nice', id: 3}]; | |
_.pluck(data, 'id'); | |
//output | |
[1, 2, 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment