Created
September 18, 2013 02:50
-
-
Save cgkio/6603859 to your computer and use it in GitHub Desktop.
working with objects in node.js
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
// working with objects in node.js: | |
// http://book.mixu.net/node/ch5.html | |
var questions = Object.keys(jsonScores); | |
questions.forEach(function (question) { | |
var answers = Object.keys(jsonScores[question]); | |
answers.forEach(function (answer) { | |
var value = jsonScores[question][answer]; | |
console.log(question + ': ' + answer + ' = ' + value); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment