Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace PatchInsertInstruction

An operation that inserts a value into an array, shifting array items as necessary and handling NOT_FOUND exceptions by creating the implied containing structure.

Properties

Const operation

operation: string = "INSERT"

Optional position

position: Position

Where to insert the value, relative to the first item matched by {@code selectedItem}. If {@code selectedItem} is unspecified, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. If {@code selectedItem} is specified but results in an empty selection, then both values specify insertion at the last position.

Optional selectedItem

selectedItem: undefined | string

A selection to be evaluated against the array for identifying a particular reference item within it, with the same format and semantics as {@code selection}.

selection

selection: string

The set of values to which the operation applies as a JMESPath expression for evaluation against the context resource. An operation fails if the selection yields an exception, except as otherwise specified. Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false.

value

value: any

A value to be inserted into the target.

Methods

getDeserializedJsonObj

getJsonObj