{
"status":"success",
"data":
{
"title":"Testing",
"token":"77fl",
"questions":
[{
"title":"How are you?",
"token":"UHGXI",
"kind":"multiple-choice",
"options":
[{
"content":"Good",
"token":"tLAzWd",
"kind":"text"
},
{
"content":"bad",
"token":"8LRR3t",
"kind":"text"
}]}]}}
I've never parsed JSON data before... what is a good first step sort of thing to parse this? I obviously don't need all of this, I need all instances of 'title', 'kind', and 'content'.
Do you do it similar to parsing a string?
This is my function to grab it...
$(document).ready(function(){
$("button").click(function(){
$.getJSON("http://quicksurvey.herokuapp.com/api/surveys/77fl/ask.json",function(result){
});
});
});
});
Where is my returned data stored exactly? Is it in 'result'?
I'm very new to all of this so I apologize if I'm making some obvious mistakes. I've been looking around for answers to my question but can't find an easy introduction to this. I'd like to parse using javascript.