jsonmergeboomi

Boomi - Merge two JSONs


I have two inbound JSON data sets that I need to combine/merge in Boomi

Inbound DataSet1

{
    "Id": 1,
    "Program": [
        {
            "ProgramId": "A",
            "ProgramName": "ProgramA"
        },
        {
            "ProgramId": "B",
            "ProgramName": "ProgramB"
        }
    ]
}

and

Inbound DataSet2

{
    "Id": 1,
    "Course": [
        {
            "CourseId": "C1",
            "CourseName": "Course 1"
        },
        {
            "CourseId": "C2",
            "CourseName": "Course 2"
        }
    ]
}

Want to Combine them to the following:

{
    "Id": 1,
    "Program": [
        {
            "ProgramId": "A",
            "ProgramName": "ProgramA"
        },
        {
            "ProgramId": "B",
            "ProgramName": "ProgramB"
        }
    ],
    "Course": [
        {
            "CourseId": "C1",
            "CourseName": "Course 1"
        },
        {
            "CourseId": "C2",
            "CourseName": "Course 2"
        }
    ]
}

I defined a JSON profile with the final expected output which has Program and Course in it - however, in Data Processing when I am trying to do a Combine JSON, I am unable to choose either elements or keys to merge the documents on.


Solution

  • I took Kris's advise and did the following:

    See the final process in the link below. Reach out if you have questions.

    Boomi Process