Json 使用 jolt 基于位置进行数组转换

Json with array transformation based upon position using jolt

我是新手。 你能告诉我如何使用 jolt.

根据位置将下面的 json 消息与数组转换为下面的输出 json 消息吗

输入消息:

[
    ["20084541", "12020584", "Frohmann Dov", "2017", "2", "75", "T7", "DFZ", "CES", "", "", "0", "90", "2010"],
    ["20084541", "12020584", "Frohmann Dov", "2017", "3", "21", "T7", "DFZ", "CES", "", "", "0", "90", "2010"],
]

输出消息:

[{
    "policyReference": "20084541",
    "insuredId": "12020584",
    "insuredName": "Frohmann Dov",
    "uwy": "2017",
    "subLOB": "2",
    "typeOfRisk": "75",
    "aircraftcountryCode": "T7",
    "aircraftId": "DFZ",
    "manufacturerId": "CES",
    "aircraftTypeCode": "",
    "aircraftSubTypeCode": "",
    "aircraftValueAmt": "0",
    "aircraftWorkNo": "90",
    "yearBuilt": "2010"
}, {
    "policyReference": "20084541",
    "insuredId": "12020584",
    "insuredName": "Frohmann Dov",
    "uwy": "2017",
    "subLOB": "2",
    "typeOfRisk": "75",
    "aircraftcountryCode": "T7",
    "aircraftId": "DFZ",
    "manufacturerId": "CES",
    "aircraftTypeCode": "",
    "aircraftSubTypeCode": "",
    "aircraftValueAmt": "0",
    "aircraftWorkNo": "90",
    "yearBuilt": "2010"
}]

感谢任何帮助。

规格

[
  {
    "operation": "shift",
    "spec": {
      "*": { // loop thru the outer array
        // each item of the outer array, is an array
        // match individual array indicies, and then send them to the 
        //  output with the nice name.
        "0": "[&1].policyReference",
        "1": "[&1].insuredId",
        "2": "[&1].insuredName" 
        // etc
      }
    }
  }
]