AnsweredAssumed Answered

Combining & Repeating an element which is not under Item level

Question asked by vinaykumar.ananthula@infosys.com on Mar 19, 2018

Hi team,

My input order is in JSON and having a field at order level whose value is repeating. and same on the target side(in XML )need to be under item level and combine the values. Please help me with this. eg. as below. my field is comp under extension let's say

Source::

Order

  Header

[{ ---

 ---

}] // header closed

Items

 item

[ {SKU 1

 ---

  ---},

 {SKU 2

 ---

  ---}] //items closed

extension

[

{

SKU 1

comp 1

}

{

SKU 1

comp 2

}

{

SKU 2

comp 30

}

] // close of extension

 

Target side data need to be like this::

<Order>

<Header>

---

---

</Header>

<Items>

<Item>

SKU 1

Comp 1,2

</Item>

<Item>

SKU 2

Comp 30

</Item>

</Items>

</Order>

Outcomes