0
我想將控制檯顯示(formData)轉換爲嵌套的JSON對象。我得到的formData是:將formdata轉換爲嵌套的JSON
{
"custom[1].a": "FIXED",
"custom[1].b": "",
"custom[1].c": "PROPORTIONATE",
"custom[1].d": ""
"custom[2].a": "FIXED2",
"custom[2].b": "",
"custom[2].c": "PROPORTIONATE2",
"custom[2].d": ""
}
I want to convert it to JSON in javascript.
"customConfiguration": [{
"a": "PROPORTIONATE",
"b": "",
"c": "FIXED",
"d": ""
},
{ "a": "PROPORTIONATE2",
"b": "",
"c": "FIXED2",
"d": ""
}]
是'定製[2] .c'一個字符串?並應該自定義成爲一個數組?從'1'開始? –
以上都不是JSON/JavaScript對象 – Satpal
這看起來不像JSON。這是實際的數據還是某種控制檯顯示? –