op: remove

Remove array elements that match a where predicate.

Allowed phases

PhaseStatus
preflight✗ forbidden
core✓ allowed
side_effects✗ forbidden

Syntax

- op: remove
  path: /cart/items
  where: "it.product_id == event.product_id"

Parameters

FieldRequiredDescription
pathyesArray field path
whereyesPlain string predicate; it = current element

Behavior

  • where must be a plain string, not { expr: "..." }. Using the object form causes ClassCastException at compile time.
  • Elements matching the predicate are removed.

filter · find · push

See also