op: clone
Deep-copy a value into a variable for use later in the same rule.
Allowed phases
| Phase | Status |
|---|---|
preflight | ✗ forbidden |
core | ✓ allowed |
side_effects | ✗ forbidden |
Syntax
- op: clone
path: /items
as: original_itemsParameters
| Field | Required | Description |
|---|---|---|
path | yes | Field path to copy |
as | yes | Variable name |
Behavior
- Use when subsequent ops mutate the array but you need the pre-mutation snapshot in expressions.
Related operations
See also
- Operations index — all ops by phase
- actions — rule structure and phases
- Intents: Rules — narrative examples