jquery的新手。以這種格式從php中獲得json響應。Jquery迭代JSON響應
{
"div1":{"data":"minute=0,hour=27,day=649,month=19K,smallSize=0, id=XXXXXXXXXX, ip=yyyyyyyyyyy<br \/>\nminute=0,hour=34,day=825,month=24K,smallSize=0, id=XXXXXXXXXX, ip=yyyyyyyyyyy<br \/>\nminute=0,hour=40,day=980,month=29K,smallSize=0, id=XXXXXXXXXX, ip=yyyyyyyyyyy<br \/>\n","address":"232323"},
"div2":{"data":"","address":"232323"},
"div3":{"data":"minute=0,hour=28,day=682,month=20K,smallSize=0, id=XXXXXXXXXX, ip=yyyyyyyyyyy<br \/>\nminute=0,hour=36,day=866,month=26K,smallSize=0, id=XXXXXXXXXX, ip=yyyyyyyyyyy<br \/>\nminute=0,hour=42,day=1019,month=30K,smallSize=0, id=XXXXXXXXXX, ip=yyyyyyyyyyy<br \/>\n","address":"232323"}
}
我如何需要遍歷這個JSON在jQuery和獲取DIV1>數據和DIV1>地址,DIV2>數據和DIV2>地址。誰能幫我?
可能重複[如何在jquer中迭代json數據y](http://stackoverflow.com/questions/4233354/how-to-iterate-json-data-in-jquery) – JohnP 2012-01-03 15:28:04
你使用'$ .getJSON'來檢索它嗎? – 2012-01-03 15:31:50