Created
June 10, 2015 11:36
-
-
Save mikejoyceio/c6d54506bc8ab24f0199 to your computer and use it in GitHub Desktop.
Access an array of object property values by index.
This file contains hidden or 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 = [ | |
{ property: '01' }, | |
{ property: '02' }, | |
{ property: '03' }, | |
{ property: '04' }, | |
{ property: '05' } | |
]; | |
for (obj in data) { | |
data[obj][Object.keys(data[obj])[0]]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment