JSON:
{
"count": 1,
"rows": [
{
"user_id": "7",
"lat": "48.452583",
"lng": "-123.545052",
"distance": "0.4852177729308128"
}
]
}
这进入我的function(data)
,我正在尝试访问count
,然后user_id
..
downloadUrl(searchUrl, function(data) {
alert( "Locations Found: " + data[0].count );
});
data.count
, data[0].count
...不工作。我对如何访问它们一无所知。