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
    }
];
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.

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

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.