我有以下JSON數據,如何使用jquery逐個解析對象到數組?
{
"componants": [{
"category": "screensets",
"position": "top",
"rotate": "180",
"3d_file": "3d_deg_180.obj",
"height": "10",
"width": "10",
"x": "239",
"y": "186",
"current_roate": "0",
"comp_color": ""
}, {
"category": "screensets",
"position": "top",
"rotate": "180",
"3d_file": "3d_deg_180.obj",
"height": "10",
"width": "10",
"x": "619",
"y": "186",
"current_roate": "0",
"comp_color": ""
}, {
"category": "screensets",
"position": "top",
"rotate": "180",
"3d_file": "3d_deg_180.obj",
"height": "10",
"width": "10",
"x": "379",
"y": "86",
"current_roate": "0",
"comp_color": ""
}],
"width": "640",
"height": "640",
"name": "Test Drawing",
"size": "40",
"screen": "Conference set"
}
如何分析使用jquery這個價值?
要分析是什麼?你想轉換成字符串 ?你能詳細解釋一下嗎 –
'obj ['componants']'是一個數組 – passion
請[編輯]你的問題來顯示所需的輸出格式是什麼。你是什麼意思「一個接一個」? – nnnnnn