How to join/aggregate collections data

Hi guys, as in the screenshot I have an array inside a bundle with multiple collections.
All I need to do is to pass to a field all first names comma separated, eg: Paul,Mario

I would repeat that for all the other items (last name etc…) but I guess the flow will be the same.

I tried the join+map but I can’t find a solution

1 Like

Heyy @Bianco_Viaggi Welcome to the community!

You can follow this steps!

  1. Iterate the array you have

  2. Using Iterator

  1. Array Output will looks like this after iteration

  1. Use Text Aggregator to combine all collection items

  2. Final output

You can repeat the same functionality with other keys like last name.

I hope this helps!

Best,
@Prem_Patel

1 Like

Prem’s solution is solid and probably easier conceptually, and easier to debug! But it will use more operations.

You said you’d tried using inline functions map() and join() … if you can get that working it would be more efficient.

I think you’d need something like: join(map(bvParticipants; firstname); ,)

bvParticipants needs to be mapped from the module that generates that output.

firstname should be the raw name of the firstName key. You get the raw name by hovering your mouse over firstName in the output bundle view.

This video has a practical example.

1 Like