AnsweredAssumed Answered

transform a json file

Question asked by gianluca on Sep 24, 2018
Latest reply on Sep 27, 2018 by leif_jacobsen

hello everyone, I'm new in dell boomi.
I'm trying to edit a json using the Data Process shape.

Input json
[
  {
    "Key" : "1234",
    "Code" : "code1",
    "Element" : "Element 3",
    "Content" : "Content 3"
  },
  {
    "Key" : "1234",
    "Code" : "code3",
    "Element" : "Element 3",
    "Content" : "Content 3"
  },
  {
    "Key" : "1234",
    "Code" : "code1",
    "Element" : "Element 1",
    "Content" : "Content 1"
  }
]
and the expected result:
[
  {

     "Key" : "1234",
    "Code": "code1",
    "Elements": ["Element 1", "Element 3"],
 "Content": ["Content 1", "Content 3" ]
  },
  {

    "Key" : "1234",
    "Code": " code3",
   "Elements": ["Element 3"],
 "Content": ["Content 3" ]
  }
]

I created Data Process and entered as Split Documents: Element (Root / Array / Campaign / Object / Code / Array / Element)
But the result is that I split them in 3 rows

Outcomes