Skip to content

Instantly share code, notes, and snippets.

@cgkio
Created September 18, 2013 02:50
Show Gist options
  • Save cgkio/6603859 to your computer and use it in GitHub Desktop.
Save cgkio/6603859 to your computer and use it in GitHub Desktop.
working with objects in node.js
// 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