You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Parent Child Transformation

edited Jul 22, 2020 3:00PM in Integration 6 comments

Content

Hi,

We have a response like below of priceSalesTransaction API (Grand Parent, Parent, Child objects are in separate structure). We want to transform like below. We have Parent Id in our Child. We have to use Parent Id value and get the Grand Parent value. Can we achieve this in OIC?

priceSalesTransaction API Original Response:

 

{
    "GrandParent": [
        {
            "GrandParentId": "GP1"
        }
    ],
    "Parent": [
        {
            "GrandParentId": "GP1",
            "ParentId": "P1",
            "Type": "A"
        },
        {
            "GrandParentId": "GP1",
            "ParentId": "P2",
            "Type": "B"
        }
    ],
    "Child": [
        {
            "ParentId": "P1",
            "ChildId": "C1",
            "Value": 100
        },
        {
            "ParentId": "P1",
            "ChildId": "C2",
            "Value": 200
        },
        {
            "ParentId": "P2",
            "ChildId": "C3",
            "Value": 300
        },
        {
            "ParentId": "P2",
            "ChildId": "C4",
            "Value": 400
        }
    ]
}
 
Expected Result:
{
    "Child": [
        {
            "ParentId""P1",
            "ChildId""C1"
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!