Lists
Six boxes for working on collections — typically the array an API has just returned.
Aggregate
Section titled “Aggregate”Reduces a list to a single value.
| Inputs | items (json) |
| Outputs | result |
| Configuration | op: count, sum, min, max, average, join — plus field (the property to aggregate) and separator (for join) |
Requête HTTP ──response[body.commandes]──► Aggregate (sum, field: montant)Transforms each element of a list.
| Inputs | items |
| Outputs | mapped (json) |
| Configuration | property (extract a property) or expression (a Handlebars template applied to each element) |
Filter
Section titled “Filter”Splits a list in two.
| Inputs | items |
| Outputs | kept (json), rejected (json) |
| Configuration | property, operator (lt, lte, eq, gte, gt, ne, contains), value |
Both outputs are useful: wire rejected onto an Assert to fail the run if
unexpected elements turn up.
Add to list
Section titled “Add to list”| Inputs | list (a list), one default value, plus one port per configured value |
| Outputs | result (json) |
| Configuration | list (a variable-typed value, or wired), values (the elements to add), updateSourceVariable (default false) |
With updateSourceVariable enabled, the box writes directly into the run
variable designated: that is how you accumulate results through a loop.
Remove from list
Section titled “Remove from list”Same shape as the previous one; removes the elements that are deeply equal to those supplied.
List ops
Section titled “List ops”The structural operations.
| Inputs | value (a list), key (a string) |
| Outputs | result |
op | Effect | Fields |
|---|---|---|
sort | Sorts | key, order (asc / desc) |
unique | De-duplicates | — |
reverse | Reverses | — |
flatten | Flattens | depth (default 1) |
chunk | Cuts into chunks | size |
slice | Extracts a portion | start, end |
groupBy | Groups by key | key |