op: clone

Deep-copy a value into a variable for use later in the same rule.

Allowed phases

PhaseStatus
preflight✗ forbidden
core✓ allowed
side_effects✗ forbidden

Syntax

- op: clone
  path: /items
  as: original_items

Parameters

FieldRequiredDescription
pathyesField path to copy
asyesVariable name

Behavior

  • Use when subsequent ops mutate the array but you need the pre-mutation snapshot in expressions.

find · map

See also