Filter collection
Filter collection Selects items whose JavaScript predicate is truthy, preserving the original item values and order. Unlike Map collection, this asset has no Execute or next control socket. Sockets and configuration - items (array, required
Filter collection#
Selects items whose JavaScript predicate is truthy, preserving the original item values and order. Unlike Map collection, this asset has no Execute or next control socket.
Sockets and configuration#
- items (array, required): source collection.
- items (array): accepted source items. count (number): accepted length.
- expression (string): new-instance default
item != null, removing nulls. If configuration is absent or empty, the code instead falls back totrue, retaining everything.
Example#
For items [{"value":5},{"value":12}], use item.value > 10. Output is [{"value":12}] with count 1. The index parameter is the source position; filtering does not rewrite or transform accepted values.
Predicate and execution details#
The expression is compiled with new Function(item, index); it cannot close over node-local inputs/config/context. It uses JavaScript Array.filter synchronously. Do not return a Promise: promises are truthy objects and are not awaited, so an asynchronous predicate would select items incorrectly.
A data dependency determines execution readiness; this asset cannot be gated directly by a control wire without publishing a customized version with a control input. Missing required input fails validation; bad predicate syntax/runtime errors fail execution. An empty source array yields count 0. The shipped wrapper has no secret/state/network calls, but expressions are trusted code with JavaScript globals. Prefer pure predicates because retries can repeat any effects an expression introduces.
Catalog identity#
| Field | Value |
|---|---|
| Source key | app.core.core.filter |
| Kind | node |
| Family | app-core |
| Pack | See library discovery |
Integration guide · Browse the catalog
Inputs#
| Socket ID | Label | Type | Required | Meaning |
|---|---|---|---|---|
items | Items | array | Yes |
Outputs#
| Socket ID | Label | Type | Required | Meaning |
|---|---|---|---|---|
items | Items | array | No | |
count | Count | number | No |
Configuration schema#
{
"type": "object",
"properties": {
"expression": {
"type": "string",
"title": "Predicate",
"default": "item != null"
}
}
}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