Reputation: 1370
I have JSONArray Containing JSONObjects
[ { 'title': abc, 'details':xyz,}, {'title': abc2,'details':xyz2}]
How to parse it using jquery?
Upvotes: 0
Views: 429
Reputation: 1231
parseJSON will convert your Json string into a javascript object. The code is something like
var array = $.parseJSON(json);
Then to access the variables you use code like
var title1 = array[0].title; //title1 is abc
Upvotes: 1
Reputation: 14464
I think you need to use parseJSON if your array is a string.
http://api.jquery.com/jQuery.parseJSON/
Upvotes: 0