Created
December 5, 2015 09:30
-
-
Save nishinoshake/9047036432b78d549cd6 to your computer and use it in GitHub Desktop.
配列のオブジェクトをひとつづつ取り出す
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
;(function() { | |
var obj = []; | |
obj.push({'name': 'kimura', 'value': 56}); | |
obj.push({'name': 'kaela', 'value': 2}); | |
obj.push({'name': 'rie', 'value': 13}); | |
for ( var i = 0; i < obj.length; i++ ) { | |
for ( var key in obj[i] ) { | |
console.log(key + ' : ' + obj[i][key]); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment