Nested list LOOP issue


I have an inbound document type which contains a list:

I have an outbound document type which contains 2 nested lists:

I need to loop over indoc/e to populate outdoc/f[0]/g. However, when I setup the LOOP step with input array = “indoc/e” and output array = “outdoc/f[0]/g”, the map inside my loop still shows multiple g element, which doesn’t seem normal.

Is there anything I’m doing wrong? Should I use another approach?
Thanks in advance for your help.


Is the f also a doclist?

If yes then you need to loop on f first and then add loop g and create a map step under g loop and check the pipeline editor ti should show correctly.

outArray outdoc/f
------------------>Loop g
---------------------->Map step to check if the g show as document instead of doclist.


Thank you rmg for your suggestion. (btw, yes f is also a doclist.)
So what I did as per your suggestion is :
-LOOP over f
–LOOP over e with output array f/g

And it worked as expected! :smiley:
Thanks again!