【问题标题】:How to put object inside array in JOLT如何在 JOLT 中将对象放入数组中
【发布时间】:2022-12-18 02:58:22
【问题描述】:

如何将对象放入数组中。我有一个名为“项目”的对象。我想要一个数组中的整个对象。

左侧是电流输出。右侧是所需的输出。

我需要在 JOLT 规范中进行哪些更改才能获得所需的输出?

输入太长,所以我已经在 Google 云端硬盘中上传了输入和颠簸规范。

以下是链接-https://drive.google.com/drive/folders/1vvdFBPwaHRVvjttUTQP0jzQlqYlGfjFZ?usp=share_link

【问题讨论】:

    标签: json mapping transformation jolt


    【解决方案1】:

    您可以将最后一个规格重新排列为

      {
        "operation": "shift",
        "spec": {
          "*": {
            "*": {
              "*": {
                "integrationEntityH*": "&3.&2.&1[#3].&",
                "integrationEntityD*": "&3.&2.&1[#3].&.poDetails.items.item[#3]"
              }
            }
          }
        }
      }
    

    【讨论】:

      猜你喜欢
      • 2021-07-18
      • 2016-08-06
      • 2021-09-10
      • 2013-07-06
      • 2022-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多