0
我有從一個php文件進來的JSON響應,JSON響應看起來如下結果:如何將json響應複製到extjs中的數組中?
[
{
"header": "Client ID",
"dataindex": "clientID"
},
{
"header": "Client Name",
"dataindex": "clientName"
},
{
"header": "Progress Bar",
"dataindex": "progressBar"
}
]
現在我想這個數據複製到以下述方式的陣列 變種allColumns = [];
//loop through the json response
var singleColumn = [];
singleColumn['header'] = Client ID from the json response whose key is header
singleColumn[dataindex'] = clientID from the json response whose key is header.
請注意:我需要做的是extjs3。