根据URL解析JSON


$.ajax({
type : "get",
cache : false,
dataType : "jsonp",
url : url1, 
jsonp : "jsonpprifx",
success : function(data) {
var json = eval('(' + JSON.stringify(data) + ')');
var counts = getJsonObjLength(json);
for(var i=0;i<counts;i++){
arr1[i]=json[i].name;
arr2[i]=json[i].count;
}
},
error : function() {
alert("error");
}
});

原文地址:https://www.cnblogs.com/IT-shen/p/4492006.html