「jQuery入門」jsonデータを扱う方法
方法1
var str = '[{“name":"oosaki","num":"1″,"price":"122″},{“name":"shi naga wa","num":"1″,"price":"100″}]’;
var xqo = eval('(' + str + ')’);
for(var i in xqo){
alert(xqo[i].name);
}
方法2
var dd = jQuery.parseJSON(data);
alert(dd[0].title);