對象:1要推一些鍵值對嵌套對象
{
"sourcePath": "vv",
"targetPath": "bb"
}
我得到一個鍵值對狀物體1和已經我有一個嵌套的對象狀物體2
對象:2
{
"user": "hdpsrvc",
"update": "13/06/2016 17:43:22",
"template": "template_1",
"formBody": [
{
"tabIndex": 0,
"type": "text",
"name": "sourcePath",
"label": "Source path"
},
{
"tabIndex": 1,
"type": "text",
"name": "targetPath",
"label": "Target path"
}
],
}
,我想的鍵值對對象1的推入像BEL嵌套對象低(請參閱formBody
下的紅色標記大膽的鍵值對)
{
"user": "hdpsrvc",
"update": "13/06/2016 17:43:22",
"template": "template_1",
"formBody": [
{
"tabIndex": 0,
"type": "text",
"name": "sourcePath",
"label": "Source path",
"sourcePath": "vv"
},
{
"tabIndex": 1,
"type": "text",
"name": "targetPath",
"label": "Target path",
"targetPath": "bb"
}
],
}
這似乎與JSON無關,但與JavaScript對象有關。請閱讀'json'標籤的使用說明。 – trincot