How to make 1 array from several bundles?

Hello. The text parser match pattern module produces bandles. Next comes the array aggregator. But it also produces bundles, each with an array in the middle. How can I get an array from the ouptput match pattern?



I tried toArray(), added a second aggregator, used a text aggregator. But every time I get 12 bundles. I need to have 1 array with these bundles in the middle.
This is the input of the aggregator module (there are, for example, 12 of them with different values):
[
{
“$1”: “Tour name: Day Tour: Asakusa Food Hunt”,
“start”: “2025-03-18T02:30:00.000Z”
}
]

Thank you

Hi alina25
To transform the text to an array you could add a “Text Aggregator” module after the Text Parser, add Text Parser as Source Module, in Row separator pick “other” then put a comma “,” and in text, map the match of the text parser

To transform the text of the “Text Aggregator” to an array use the split string function with a comma as a separator on a “Set variable” or “Set Multiple variables” module


That will return an array

1 Like

Hello Jonathan. Thank you for your detailed and clear answer. I understand that this should work. But split() still produces collections with an array in each collection.

Text ageregator settings and output


And the split() module


Hey there,

it looks like it is not the Text Parse the module that is producing the extra bundles, but something before it. Most likely you need to change the source module of the aggregator to the correct module. Can you show the entire flow?

Hi Stoyan, thank you for writing.

The problem was that the Text Parse was after the iterator. Because of this, the Text Parse output could not be converted to an array.

I placed the Text Parse before the aggregator and iterator, then applied the text aggregator and finally the data started to come in the form I needed :slightly_smiling_face:

Thank you all for responding!

1 Like