var questions = {
game: {
question_1: {
question: "Question 1",
points: 7
},
question_2: {
question: "Question 2",
points: 5
}
}
};
New to programming...
How do I use a for-loop to iterate over my questions object to access questions.game.question_1.question? Or questions.game.question_[n].question
var answers = [];
for(var i=0; i <questions.game.length; i++) {
questions.game.question_[i].question.push(answers);
}