chunk
Split an array into sub-arrays of the given size. Last chunk may be smaller.
array(required): the array to splitsize(required): maximum elements per chunk
bash
echo '{"items": ["A", "B", "C", "D", "E", "F", "G"]}' \
| utlx -e 'chunk($input.items, 3)'
# [["A", "B", "C"], ["D", "E", "F"], ["G"]]utlx
// Batch processing — send items in groups of 100
{
batches: map(chunk($input.records, 100), (batch) -> {
batchSize: count(batch),
items: batch
})
}