-
I ran your test code for reading an edi stream into json: https://github.com/xlate/staedi/wiki/Reading-EDI-Data-(JSON-Conversion). I got the same response w/ the same payload/schema. However, when I repeated the loop structure in the edi payload -- I only got the last entry of the repeating elements. Looking for verification that my understanding/expectation is correct... and the example code has an issue (as opposed to the code is correct and my understanding/input it flawed). Expected result.. json payload as in the example except with "2000" as an array like this. edi payloaded I tested with:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
@d-floyd you're right, that example doesn't work with repeated loops because it uses the loop ID as the key. If you wanted to make that work it would probably be better to represent loops as arrays rather than objects. |
Beta Was this translation helpful? Give feedback.
-
@MikeEdgar , i am facing same issue with repeated loops, can you share some sample code to make it work? |
Beta Was this translation helpful? Give feedback.
@d-floyd you're right, that example doesn't work with repeated loops because it uses the loop ID as the key. If you wanted to make that work it would probably be better to represent loops as arrays rather than objects.