op: push

Append an element to an array field.

Allowed phases

PhaseStatus
preflight✗ forbidden
core✓ allowed
side_effects✗ forbidden

Syntax

- op: push
  path: /checkins
  value: event.show_id
 
- op: push
  path: /cart/items
  value:
    product_id: "event.product_id"
    quantity:   "event.quantity"

Parameters

FieldRequiredDescription
pathyesArray field path
valueyesScalar, object, or expression

Behavior

  • Array must be declared in state with type: array and a matching item_type.

remove · filter · find

See also