1. Docs
  2. Formulas
  3. Functions

CHUNK_ARRAY

Chunks an array into arrays with chunk_size elements. The last chunk may contain less than chunk_size elements.

Categories: Arrays

Syntax

CHUNK_ARRAY(array, chunk_size)

Examples

Example 1

Input

1
{
2
"my_action": {
3
"message": [
4
"north",
5
"south",
6
"east",
7
"west"
8
]
9
}
10
}

Formula

CHUNK_ARRAY(my_action.message, 2)

Output

1
[
2
[
3
"north",
4
"south"
5
],
6
[
7
"east",
8
"west"
9
]
10
]

Sample actions

Event Transform
CHUNK ARRAY
Event Transform
My Action

Select an action to inspect

You can also click "Copy actions" and paste them in your Tines story to see how they work.

Was this helpful?