I want an array of objects, and each object has a string, an array of strings and an integer...
Isn't this right?
var ques = [
{
"q": "quest1",
"a": ["ans1", "ans2", "ans3", "ans4"],
"c": 1
},
{
"q": "quest4",
"a": ["ans1", "ans2", "ans3"],
"c": 3
},
{
"q": "quest7",
"a": ["ans1", "ans2"],
"c": 2
}
];
416E64726577
2,2242 gold badges26 silver badges49 bronze badges
asked Jul 15, 2014 at 13:35
XandruDavid
3104 silver badges14 bronze badges
-
What is the problem now?Raouf Athar– Raouf Athar2014年07月15日 13:39:15 +00:00Commented Jul 15, 2014 at 13:39
-
1Why are you posting this? did you encounter any problem?Alexandru Severin– Alexandru Severin2014年07月15日 13:39:29 +00:00Commented Jul 15, 2014 at 13:39
1 Answer 1
Yes, that is a valid array of objects.
answered Jul 15, 2014 at 13:37
tymeJV
105k14 gold badges165 silver badges158 bronze badges
Sign up to request clarification or add additional context in comments.
1 Comment
XandruDavid
Ok, i had an error when trying to reach an item from the inner array... sorry for the useless question!
lang-js