To do this, you can use these built-in functions:
-
map
map(complex array; key; [filter by key]; [csv-values for filtering]) -
flatten
flatten(array) -
deduplicate
deduplicate(array)
Here’s an example of how you can use these functions together:
{{ deduplicate(flatten(map(array; key))) }}
e.g.:
{{ deduplicate(flatten(map(132.array; "data.items")); "id.videoId") }}
![]()
Oh, and you don’t use the GroupBy option in the aggregator, because you are aggregating arrays, not bundles.
Module Export - quick import into your scenario
You can copy and paste this module export into your scenario. This will import the modules (with fields/settings/filters) shown in my screenshots above.
-
Move your mouse over the line of code below. Copy the JSON by clicking the copy button on the right of the code, which looks like this:

-
Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.
-
Click on each imported module and re-save it for validation. There may be some errors prompting you to remap some variables and connections.
JSON module export — paste this directly in your scenario
{"subflows":[{"flow":[{"id":133,"module":"util:SetVariables","version":1,"parameters":{},"mapper":{"variables":[{"name":"mapped","value":"{{map(128.array; \"data.items\")}}"},{"name":"flattened","value":"{{flatten(map(128.array; \"data.items\"))}}"},{"name":"deduped","value":"{{deduplicate(flatten(map(128.array; \"data.items\")); \"id.videoId\")}}"}],"scope":"roundtrip"},"metadata":{"designer":{"x":1781,"y":353}}}]}],"metadata":{"version":1}}
Hope this helps! If you are still having trouble, please provide more details.
— @samliew
