-
-
Save mlakkadshaw/6bc81a35e33dbcfcc1bc to your computer and use it in GitHub Desktop.
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