0
我在頁下面的對象:解析JSON在編程頁
<script type="text/javascript">var caseMgtData =
{
"totalNumOfCase": 2,
"cases": [{
"id": "50017000003fWF4AAM",
"caseNumber": "00007764",
"status": "New",
"priority": "Low",
"subject": "Issue summary goes here",
"description": "Full Description Goes here",
"caseOwner": "00Go00000018IpCEAU",
"contact": {
"recordId": "00317000005XJUCAA4",
"name": "blah Herring",
"firstName": "blah",
"lastName": "blah",
"email": "[email protected]",
"phone": "5209012560",
"mobile": "5204655312"
},
"timeOpened": "2016-02-22T05:12:16.000+0000",
"caseOrigin": "Web"
}, {
"id": "50017000001NVoyAAG",
"caseNumber": "00002009",
"status": "Closed",
"priority": "Low",
"subject": "blah last test",
"description": "blah last test",
"caseOwner": "00517000000YfBJAA0",
"contact": {
"recordId": "00317000005XJUCAA4",
"name": "Blah blah",
"firstName": "blah",
"lastName": "Herring",
"email": "[email protected]",
"phone": "5209012560",
"mobile": "5204655312"
},
"timeOpened": "2015-03-10T17:34:36.000+0000",
"timeClosed": "2015-06-03T05:37:16.000+0000",
"caseOrigin": "Web"
}]
}
</script>
我如何使用jQuery顯示每種情況?我可以得到caseMgtData.cases [0] .status並只顯示,但我怎麼做每個或foreach並顯示數據?