JOLT Shift转换

时间:2019-04-01 05:59:26

标签: jolt

需要JSON输入和输出的JOLT规范.PFB需要相同的数据。

Output:
{"buyerInfo": {
    "id": "as123-e617-4410-969f",
    "primaryContact": {
      "name": {
        "firstName": "Karan",
        "lastName": "Singh"
      },
      "phone": {
        "completeNumber": "9021675435"
      },
      "email": {
        "emailAddress": "Karan.Singh@gmail.com"
      }
    }
  }
}
Input:
{"customer": {
      "contact": {
        "name": {
          "firstName": "Karan",
          "lastName": "Singh",
          "middleName": null
        },
        "phone": "902-167-5435",
        "secondaryPhone": null,
        "email": "Karan.Singh@gmail.com"
      }
    }
}

请帮助我提供相同的JOLT规范。 另外,请分享JOLT链接。

1 个答案:

答案 0 :(得分:0)

[   {     “ operation”:“ shift”,     “规范”:{       “客户”:{         “联系”: {           “名称”: {             “ firstName”:“ buyerInfo.primaryContact.name.firstName”,             “ lastName”:“ buyerInfo.primaryContact.name.lastName”           },           “ phone”:“ buyerInfo.primaryContact.phone.completeNumber”,           “ email”:“ buyerInfo.primaryContact.email.emailAddress”         }       }     }   } ]

获得了JOLT规范:)