无法使用 Jolt (V0.1.1) 将 Json 的数组转换为 Flattern Json

Not able to Convert Array of Json to Flattern Json Using Jolt (V0.1.1)

输入载荷:

{
  "accountNo":112233,
  "type":"DEDICATED",
  "Plans" : {
     "One":"Basic",
     "Two":"Mid",
     "Three":"Premium"  
   },

  "Address": {
     "Primary":{
       "Addressline1":" road 1, boss lane",
      "AddressLine2": "ST",
    "City":"Tex"
    }
  }

}

预期有效载荷:

{
  "accountNo":112233,
  "type":"DEDICATED",
  "One":"Basic",
  "Two":"Mid",
  "Three":"Premium",
  "Addressline1":" road 1, boss lane",
  "AddressLine2": "ST",
  "City":"Tex"
}

已使用 Jolt v0.1.1 无法转换,谁能帮帮我

检查此规范,

[
  {
    "operation": "shift",
    "spec": {
      "accountNo": "accountNo",
      "type": "type",
      "Plans": {
        "One": "One",
        "Two": "Two",
        "Three": "Three"
      },
      "Address": {
        "Primary": {
          "Addressline1": "Addressline1",
          "AddressLine2": "AddressLine2",
          "City": "City"
        }
      }
    }
  }
]

您可以通过将其余部分分成 PlansAddress.Primary* 的条件分支来单独计算表达式(非嵌套) shift 转换中的元素,例如

[
  {
    "operation": "shift",
    "spec": {
      "Plans": {
        "*": "&"
      },
      "Address": {
        "Primary": {
          "*": "&"
        }
      },
      "*": {
        "@": "&"
      }
    }
  }
]