Repository navigation
Keyword array map
Oliver Atkinson edited this page May 10, 2026
·
1 revision
Maps each array element into a new value.
For each element, item is the current element.
{
"{returns}": {
"array_map": {
"over": [],
"copy": [],
"into_self": false,
"flattened": false
}
}
}-
overis the source array. -
copydescribes fields to write for each output element. -
into_selfstarts each output element from the original element instead of an empty object. -
flattenedflattens array outputs by one level.
{
"{returns}": {
"array_map": {
"over": [
{ "name": "Dorothy", "role": "traveler" },
{ "name": "Scarecrow", "role": "companion" }
],
"copy": [
{
"value": { "{returns}": { "item": ["name"] } },
"to": ["label"]
}
]
}
}
}The result is:
[
{ "label": "Dorothy" },
{ "label": "Scarecrow" }
]