JSON TransformArray
concat
Concatenate additional arrays onto the current one
concat
Appends the contents of every array in arrays to the current array, in order.
Options
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
arrays | array<array> | Yes | — | Arrays (literal or selector-evaluated) whose elements will be appended in order. |
Example
Input
[1, 2]Operation
{
"type": "concat",
"options": {
"arrays": [
[3, 4],
[5, 6]
]
}
}Output
[1, 2, 3, 4, 5, 6]In a Circuit Step
{
"name": "merge_history_streams",
"description": "Combine the primary conversation with auxiliary context messages",
"function": "circuit.core.transform.json",
"input": {
"source": "${{ messages }}",
"operations": [
{
"type": "concat",
"options": {
"arrays": [
"${{ extra_context_messages }}"
]
}
}
]
},
"outputs": [
{
"name": "combined_messages",
"description": "Primary messages followed by extra context messages",
"value": "${{ merge_history_streams.output.transformed_result }}"
}
]
}Notes & gotchas
- Errors with
concat: expected arrayif the current value is not an array. - Each entry in
arraysis selector-evaluated. Non-array values (after evaluation) are silently skipped — they are not coerced into single-element arrays. Usepushif you want that behaviour. - Selectors work both at the entry level and inside the entries:
"arrays": ["${{ extra_messages }}"]and"arrays": [["${{ first_msg }}"]]are both valid.