Skip to content

Instantly share code, notes, and snippets.

@n9ti
Created August 31, 2014 18:37
Show Gist options
  • Save n9ti/de24433a3674d9fc7c90 to your computer and use it in GitHub Desktop.
Save n9ti/de24433a3674d9fc7c90 to your computer and use it in GitHub Desktop.
JSON Example
var myJSON = {
firstName: 'Nati',
lastName: 'Namvong',
stdCode: '4466260181',
enroll: [{
subjectName: 'Mobile',
subjectId: '665313',
creadit: 3
}, {
subjectName: 'C++',
subjectId: '665311',
creadit: 3
}
]
};
for (var i = 0; i < myJSON.enroll.length; i++) {
console.log(myJSON.enroll[i].subjectId);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment