Skip to main content
Breaks a single list into several smaller lists of a fixed size. The items are taken in order and grouped together until each group reaches the size you choose; the final group holds whatever is left over and may be smaller. Use this to process data in manageable batches, for example sending products to an external system 50 at a time instead of all at once.

Fields

Sample data

FieldValue
Length2
Preserve keysoff
Input:
{ "skus": ["A1", "B2", "C3", "D4", "E5"] }
Output:
{ "skus": [["A1", "B2"], ["C3", "D4"], ["E5"]] }
The five items are grouped into pairs, with the leftover item forming a final single-item chunk. With Preserve keys turned on, the items keep their original positions instead, so the later chunks would look like { "2": "C3", "3": "D4" } and { "4": "E5" }.