对象: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