op: remove
Remove array elements that match a where predicate.
Allowed phases
| Phase | Status |
|---|---|
preflight | ✗ forbidden |
core | ✓ allowed |
side_effects | ✗ forbidden |
Syntax
- op: remove
path: /cart/items
where: "it.product_id == event.product_id"Parameters
| Field | Required | Description |
|---|---|---|
path | yes | Array field path |
where | yes | Plain string predicate; it = current element |
Behavior
wheremust be a plain string, not{ expr: "..." }. Using the object form causesClassCastExceptionat compile time.- Elements matching the predicate are removed.
Related operations
See also
- Operations index — all ops by phase
- actions — rule structure and phases
- Intents: Rules — narrative examples