0

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
2
  • What is the problem now? Commented Jul 15, 2014 at 13:39
  • 1
    Why are you posting this? did you encounter any problem? Commented Jul 15, 2014 at 13:39

1 Answer 1

1

Yes, that is a valid array of objects.

answered Jul 15, 2014 at 13:37
Sign up to request clarification or add additional context in comments.

1 Comment

Ok, i had an error when trying to reach an item from the inner array... sorry for the useless question!

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.