Map collection
Runs an expression for each item and returns the transformed collection.
Map collection#
Evaluates a JavaScript expression for every item in an input array and returns a transformed collection. This is one node execution, not separate visual child flows.
Sockets and configuration#
- exec (control): optional execution gate.
- items (array, required): source collection.
- items (array): transformed results in original item order. count (number): result length.
- next (control): automatic success route.
- expression (string): default item; an empty expression also falls back to item.
Expression behavior#
The expression receives parameters item and index through new Function. It is an expression, so return object literals inside parentheses. It does not close over the node's inputs/config/context variables. Ordinary JavaScript globals remain available and code is trusted, not sandboxed.
Example#
With items [{"kW":1.5},{"kW":2}] and expression ({ ...item, watts: item.kW * 1000 }), the result adds watts 1500 and 2000; count is 2. Empty arrays produce an empty result and count 0.
Promise.all awaits promise-valued results concurrently and preserves order; there is no per-item throttle or retry boundary. A rejected result or syntax error fails the whole node, and configured retries evaluate the entire collection again. Prefer pure expressions: external effects may be repeated and large/unbounded collections consume memory and timeout budget. This shipped wrapper does not itself use secrets, checkpoints or network, but an authored expression can execute host-accessible code. Returned values must remain JSON-transportable.
Catalog identity#
| Field | Value |
|---|---|
| Source key | app.core.core.map |
| Kind | node |
| Family | app-core |
| Pack | See library discovery |
Integration guide · Browse the catalog
Inputs#
| Socket ID | Label | Type | Required | Meaning |
|---|---|---|---|---|
exec | Execute | control | No | |
items | Items | array | Yes |
Outputs#
| Socket ID | Label | Type | Required | Meaning |
|---|---|---|---|---|
next | Next | control | No | |
items | Items | array | No | |
count | Count | number | No |
Configuration schema#
{
"type": "object",
"properties": {
"expression": {
"type": "string",
"title": "Item expression",
"default": "item"
}
}
}Source and installed versions#
This reference describes the maintained source catalog snapshot, not a live export of your installation. Published definitions use immutable versions; installed graphs retain their exact pins. Discover and read the installed definition and selected version before wiring it. See versioning, connections and integration setup.
Source provenance
Reviewed against maintained source and topic documentation on 23 October 2026. This is a source snapshot; installed versions and provider access may differ.
../OpenNodeFlow-Library/work/catalog-all.mjs../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjsshared/seed.tsshared/storage-library.tsshared/variable-library.tsshared/control-flow.tsshared/remote-routes.tsserver/runtime-library.tsshared/error-library.tsshared/storage-model.tsshared/builtin-documentation.ts