op: push
Append an element to an array field.
Allowed phases
| Phase | Status |
|---|---|
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
| Field | Required | Description |
|---|---|---|
path | yes | Array field path |
value | yes | Scalar, object, or expression |
Behavior
- Array must be declared in
statewithtype: arrayand a matchingitem_type.
Related operations
See also
- Operations index — all ops by phase
- actions — rule structure and phases
- Intents: Rules — narrative examples