有谁知道仅使用 es5 重新格式化下面的 JSON 代码的最佳方法是什么?我没有做太多的 json 格式化,这就是为什么开放征求建议。
{
"success": true,
"results": [
{
"id": "12",
"base": "263422"
},
{
"id": "15",
"base": "223322"
}
}
至:
{
"success": true,
"results": [
{
"id": 29,
"bill": [
{
"id": 29,
"base": 124122,
}
]
},
{
"id": 33,
"bill": [
{
"id": 33,
"base": 12412232
}
]
}
}