我想知道如何循环遍历这个 json 数据以使用 jquery 获取其中的值?我所拥有的是undefined
。我$.ajax.get()
用来获取文件然后我试图遍历它以获取其中的数据。JSON看起来像这样......
get 的结果是一个字符串!
[
{
"category": "anti-social-behaviour",
"persistent_id": "",
"location_subtype": "STATION",
"month": "2012-11",
"location": {
"latitude": "52.6313999",
"street": {
"id": 1447707,
"name": "Leicester"
},
"longitude": "-1.1252999"
},
"context": "",
"id": 18782816,
"location_type": "BTP",
"outcome_status": {
"category": "Under investigation",
"date": "2012-11"
}
}
]
问候/哈里斯!