The var.expand: command expands nested keys at a given dictionary path.
inputs:
records/tickets:
record_type: ticket
required@bool: yes
start:
var.expand:
inputs:
key: inputs:tickets
paths: owner_,customfields
return:
owners@json: {{array_column(inputs.tickets,'owner__label','_label')|json_encode}}
Result:
owners:
'[#ANB-75367-518] Always use HTML mode on replies': Kina Halpue
Syntax
inputs:
Key | Req’d | |
---|---|---|
key: |
The key path to expand, delimited with colons (: ). This must be a dictionary or an array of dictionaries. When omitted, key expansion happens in the root dictionary |
|
paths: |
√ | The paths to expand at the given dictionary keys. |
on_simulate:
The commands to run during simulation instead of expanding the key.
If omitted, the value is appended during simulation.
on_success:
The commands to run on success.
on_error:
The commands to run on failure. If omitted, the automation exits in the error
state.
The output:
placeholder receives a dictionary with these keys:
Key | |
---|---|
error |
The error message. |