cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Create xml segment only if condition is met

Sahil
Contributor

Hi,
I am trying to convert xm1 into xml2.
In order to that I have used XML Parser, Mapper,XML Formatter.
There is one logic, I need to create a segment only if value of a particular repeatable segment is either
jsonPath($, โ€œ$Z_RDGD102.IDOC.DKA1[].PAR") is equal to โ€˜AFโ€™ or โ€˜AGโ€™ or โ€˜PCโ€™.
And part of output segment is like below:-
jsonPath($, "$Order.Data.Addresses[
].Address[*]โ€)

How do I achieve it, please let me know.

5 REPLIES 5

Supratim
Contributor III

@Sahil you can try with filter function. If you can share your sample input json and expected output as xml then it will be easy to resolve.