Reputation: 1401
i cannot get the json datas via
jQuery.parseJSON(myArr);
$.each(myArr, function(key, value) {
alert(key + ': ' + value);
});
What's wrong ?
Upvotes: 0
Views: 29
Reputation: 11744
You need to capture the return of the parseJSON method.
jQuery.parseJSON(myArr);
should read
myArr = jQuery.parseJSON(myArr);
otherwise, you are passing a string into the $.each method.
Upvotes: 2