我的输入JSON:
[
{
"label": [
{
"name": "abc"
}
]
},
{
"label": [
{
"name": "xyz"
}
]
}
]
我的规格:
[{
"operation": "shift",
"spec": {
"*": {
"label": {
"0": {
"name": "name"
}
}
}
}
}]
预期输出:
[{
"name": "abc"
}, {
"name": "xyz"
}]
生成的输出:
{
"name" : [ "abc", "xyz" ]
}
我如何不合并规格中的阵列?
尝试此规格,
[
{
"operation": "shift",
"spec": {
"*": {
"label": {
"*": {
"name": "[&3].name"
}
}
}
}
}
]