Created
October 3, 2015 11:25
-
-
Save zentetsukenz/c56cb28e2e8dfaaac9ee to your computer and use it in GitHub Desktop.
Javascript simple array pluck
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
function pluck (arrayOfObject, property) { | |
return arrayOfObject.map(function (item) { | |
return item[property]; | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment