如何将JSON格式更改为预期格式
[{
"storenm": "S1",
"FA_SOH": "20964",
"FA_CY_QTY": "15",
"FA_CT_QTY": "44497"
},
{
"storenm": "S2",
"FA_SOH": "1096",
"FA_CY_QTY": "2",
"FA_CT_QTY": "7501"
}];
[['S1',
'20964',
'15',
'44497'],
['S2',
'1096',
'2',
'7501']];
答案 0 :(得分:-1)
您可以使用json_decode($json,true)获取数组,然后使用array_values()删除密钥,然后使用json_encode($newarray)将其转换回json