比如我们获取的字符串是:[{"CityId":18,"CityName":"西安","ProvinceId":27,"CityOrder":1},{"CityId":53,"CityName":"广州","ProvinceId":27,"CityOrder":1}]
可以通过eval处理:
var data;var json='[{"CityId":18,"CityName":"西安","ProvinceId":27,"CityOrder":1},{"CityId":53,"CityName":"广州","ProvinceId":27,"CityOrder":1}]';eval("data="+json);
获取其中的值:
$.each(data,function(index, value){ alert(value.CityName);})
来自: