In this example, it is demonstrated how to retrieve data from the "rowDataList" array within the JSON data, specifically under the key "CUR_X_COUNT," and how to change the key expression of this array.

Sample Original Message

{
  "statusCode": 200,
  "statusDescription": "OK",
  "numRows": 0,
  "data": [
    {
      "CUR_X_COUNT": {
        "rowDataList": [
          {
            "INS_ID": "123",
            "INS_NAME": "aaa",
            "TOTAL": 645
          },
          {
            "INS_ID": "124",
            "INS_NAME": "bbb",
            "TOTAL": 645
          },
          {
            "INS_ID": "125",
            "INS_NAME": "ccc",
            "TOTAL": 645
          }
        ],
        "columnNames": [
          "INS_ID",
          "INS_NAME",
          "TOTAL"
        ],
        "numRows": 3
      }
    }
  ],
  "result": [],
  "elapsedTime": 4,
  "errors": []
}
CODE

JOLT code

[
  {
    "operation": "shift",
    "spec": {
      "data": {
        "*": {
          "CUR_X_COUNT": {
            "rowDataList": "ModifiedList"
          }
        }
      }
    }
  }
]

CODE

Sample Result Message

{
  "ModifiedList" : [ {
    "INS_ID" : "123",
    "INS_NAME" : "aaa",
    "TOTAL" : 645
  }, {
    "INS_ID" : "124",
    "INS_NAME" : "bbb",
    "TOTAL" : 645
  }, {
    "INS_ID" : "125",
    "INS_NAME" : "ccc",
    "TOTAL" : 645
  } ]
}

CODE