我正在尝试显示来自我的AJAX请求的数组,但是出了点问题。有错误:
JSON.parse:JSON数据第1行第2列的意外字符
$.getJSON(domain +"/data", request, function( data, status, xhr ) {
$.each(JSON.parse(data), function(name,url){
console.log(name + ":" +url)
})
});
数组
{
"users": [
{ "name": "jay", "url": "http://example.com/jay/" },
{ "name": "cleo", "url": "http://example.com/cleo/" },
{ "name": "tom", "url": "http://example.com/tom/" },
]
}