Home > Mobile >  jolt transformation to concatenate two elements of a JSON array
jolt transformation to concatenate two elements of a JSON array

Time:11-04

Hi I am novice to jolt transformation. I need help with following requirement.

input :

[
  {
    "firstName": "Fname1",
    "lastName": "Lname1",
    "state": "PA"
  },
  {
    "firstName": "Fname2",
    "lastName": "Lname2",
    "state": "VA"
  },
  {
    "firstName": "Fname3",
    "lastName": "Lname3",
    "state": "CA"
  }
]

expected output:

{
  "names": [
    "Fname1 Lname1",
    "Fname2 Lname2",
    "Fname3 Lname3"
  ],
  "states": [
    "PA",
    "VA",
    "CA"
  ]
}

CodePudding user response:

You can use consecutive enter image description here

  • Related