op: filter
Keep only array elements matching a where predicate (in-place).
Allowed phases
| Phase | Status |
|---|---|
preflight | ✗ forbidden |
core | ✓ allowed |
side_effects | ✗ forbidden |
Syntax
- op: filter
path: /cart/items
where: "it.quantity > 0"Parameters
| Field | Required | Description |
|---|---|---|
path | yes | Array field path |
where | yes | Plain string; it = current element |
Behavior
- Inverse of
remove: matching elements are kept.whereis a plain string.
Related operations
See also
- Operations index — all ops by phase
- actions — rule structure and phases
- Intents: Rules — narrative examples