11-21-2019 12:54 PM
Hello,
I would like to know the best way to convert json list of accounts to an xml repeating element like below-
“accounts”:[
“10”,
“9”,
“8”,
“7”,
“6”,
“5”,
“4”,
“3”,
“2”,
“1”
]
to
ns1:AccountIds
ns2:long10</ns2:long>
ns2:long9</ns2:long>
ns2:long8</ns2:long>
ns2:long7</ns2:long>
ns2:long6</ns2:long>
ns2:long5</ns2:long>
ns2:long4</ns2:long>
ns2:long3</ns2:long>
ns2:long2</ns2:long>
ns2:long1</ns2:long>
</ns1:AccountIds>
03-31-2020 08:25 AM
Hello @karansawhney
You can convert json array to an xml repeating element with xml generator and Apache velocity template connected to mapper with a binary output view.
I created a pipeline from your example , you can check it .
test2_2020_03_31.slp (4.8 KB)
Best regards
Dimche