Scoped Arguments
Values injected by an enclosing construct, read through the $arg expression.
Scoped arguments are $-prefixed identifiers that name a value injected by
an enclosing construct. They are read through the $arg expression:
{ "$arg": "$item" }{ "$arg": "$0" }Required
$arg(string): The scoped argument name (e.g."$item","$index","$content","$0","$1").
Returns: The value of the referenced argument.
Available Arguments
Each construct injects its own arguments, valid only within its scope:
| Argument | Injected by | Value |
|---|---|---|
$item | Maps | The current array item |
$index | Maps | The current item's index (0-based) |
$content | Translation tags | The tag's formatted chunks |
$0, $1 | Actions | The callback's positional args |
A document MUST NOT reference a scoped argument outside the scope of the construct that injects it.
Accessing Nested Values
Append a JSON Pointer path to the identifier to reach into a nested property or array element:
{ "$arg": "$0/email" }{ "$arg": "$0/1" }{ "$arg": "$item/name" }Here $0/email reads the email property of the first positional
argument, $0/1 reads the second element of an array argument, and
$item/name reads the name property of the current map item.