jsonオブジェクトを二次元配列に変換
1363 ワード
//json ,json_encode($excel_lists)
[
{
"ord_cd": "Order Number",
"usr_id": "user ID",
},
{
"ord_cd": "12",
"usr_id": "delia1",
}
]
// key json
var arrData = json.excel_lists;
var data= [];
for (var i in arrData) {
var item = [];
for (var j in arrData[i]) item.push(arrData[i][j]);
data.push(item)
}
//
[
["Order Number", "user ID"],
["12", "delia1"]
]