Hello everyone,
I have an Array Aggregator output that looks like this (simplified):
json
[
{ "ID PRESTA (J)": "370" },
{ "ID PRESTA (J)": "371" }
]
The number of “ID PRESTA (J)” is variable in my array.
My goal is to dynamically build the following XML script:
<cart_row>
<id_product>370</id_product>
</cart_row>
<cart_row>
<id_product>371</id_product>
</cart_row>
Important:
- I want the entire XML script inside a single variable (one big block of text).
- I need it to be done in one operation only.
I tried using a map()
and join()
inside a Set Variable module but it didn’t work…
it either returns an empty result or an error, depending on my attempts.
How should I correctly build the
map()
and join()
expression to generate the full XML script in just one variable?
Thank you very much for your help!
Davy