Is there a way to flatten the array aggregator return, or sub-iterate through the bundle collections, so I get my un-nested array of collections?
Context:
I’m parsing through an ATS API return, that has one or more nested Collections per data row.
{ response: { data: [ [ {collection1}, {collection2} ] ] ] } }
{ response: { data: [ [ {collection3} ] ] } }
{ response: { data: [ [ {collection4}, {collection5} ] } }
Expectation:
I’m using an iterator-array aggregator, to parse through the collections, make a transform, and then list all of the collections as an array one level deep.
[ {collection1}, {collection2}, {collection3}, {collection4}, {collection5} ]
Reality:
Unfortunately, the array coming out of the array aggregator returns it like so:
Bundle 1: [ {collection1}, {collection2} ]
Bundle 2: [ {collection3} ]
Bundle 3: [ {collection4}, {collection5} ]
…which is frankly very frustrating (and I hope I’m reasonable with thinking that an iterator, well, iterates)
Steps Tried
Thinking I needed to iterate again, I tried adding another iterator-array aggregator after the first one, but unfortunately it would return the same result as the first iterator-array aggregator group.
Ideally I don’t want the solution to get too fancy or highfalutin, since my scenarios are peer-reviewed by our architecture and BI teams, who may not understand why I would use funky workarounds.
Scenario layout