Parent Child Transformation
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:
0