1

我想使用颠簸转换来连接两个列表

输入

{
    "listA": [
        1,
        2,
        3
    ],
    "listB": [
        4,
        5
    ]
}

颠簸规格

[{
    "operation": "shift",
    "spec": {
        "listA": "items",
        "listB": "items"
    }
}]

期望的输出:

{
  "items" : [ 1, 2, 3, 4, 5 ]
}

我得到一个嵌套列表。如何获得所需输出中的平面列表?

4

1 回答 1

2
[
   {
     "operation": "shift",
     "spec": {
       "listA": {
         "*": "items[]"
       },
       "listB": {
         "*": "items[]"
       }
     }
  }
]
于 2017-12-20T17:39:42.277 回答