Jolt transformation combining multiple values in an array of objects when multiple objects are in input

Check this spec,

[
  {
    "operation": "shift",
    "spec": {
      "Name": "ProjectName",
      "Documents": {
        "*": {
          "Name": "DocumentDefinitions[&1].Name",
          "Variants": {
            "*": {
              "Name": "DocumentDefinitions[&3].SectionDefinitions[&1].VarientNames[]",
              "TrainingSamples": {
                "*": {
                  "Name": "DocumentDefinitions[&5].SectionDefinitions[&1].ImageSources[&1].ImageName",
                  "Value": "DocumentDefinitions[&5].SectionDefinitions[&1].ImageSources[&1].ImageValue"
                }
              }
            }
          },
          "Fields": {
            "*": {
              "Name": "DocumentDefinitions[&3].SectionDefinitions[&3].Fields[&1].Name",
              "Type": "DocumentDefinitions[&3].SectionDefinitions[&3].Fields[&1].Type"
            }
          }
        }
      }
    }
  }
]

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top