REVERSE

Reverses the order of the elements in an array. Please note, this operation will recursively flatten arrays and directly nested arrays, then reverse the final array.

Syntax 

REVERSE(array)

Usage examples 

Example 1

Input

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

Formula

REVERSE(my_action.message)

Output

1
[
2
"west",
3
"east",
4
"south",
5
"north"
6
]

Example 2

REVERSE can't directly reverse an individual piece of text, but you can combine it with SPLIT and JOIN to make it work:

Input

1
{
2
"my_action": {
3
"message": "edit maps"
4
}
5
}

Formula

JOIN(REVERSE(SPLIT(my_action.message, "")), "")

Output

"spam tide"

Example 3

REVERSE also flattens arrays

Input

1
{
2
"my_action": {
3
"message": [
4
[
5
1,
6
2,
7
3
8
],
9
[
10
4,
11
5,
12
6
13
],
14
[
15
7,
16
8,
17
9
18
]
19
]
20
}
21
}

Formula

REVERSE(my_action.message)

Output

1
[
2
9,
3
8,
4
7,
5
6,
6
5,
7
4,
8
3,
9
2,
10
1
11
]

Sample Actions 

Event Transform
My Action
Event Transform
REVERSE

Select an action to inspect

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

Event Transform
My Action
Event Transform
REVERSE

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?