-
22 Nov 2012 1:22 AM #1
Unanswered: Parsing Nested Json
Unanswered: Parsing Nested Json
I am getting a response in nested JSON format from the server which is below:
The above JSON is dynamic which means the number of answers for each question may vary.Code:{ "Feedback":[ { "Question":"question1", "Answers":[ { "Answer":"answer1", "AId":1 }, { "Answer":"answer2", "AId":2 } ], "QuestionId":1 }, { "Question":"question2", "Answers":[ { "Answer":"answer3", "AId":3 }, { "Answer":"answer4", "AId":4 }, { "Answer":"answer5", "AId":5 } ], "QuestionId":2 } ] }
How can I parse this JSON and display answers in a combo box correspond to each question?
Please help.
-
24 Nov 2012 6:23 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3155
Are you using associations?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
26 Nov 2012 2:08 AM #3


Reply With Quote