Join List Into Text | ARRAY_JOIN

Syntax

ARRAY_JOIN( [value], [separator = ""] )

Parameters

value
The ARRAY to join the values of.

separator
The STRING value used when joining the values together.

Return Value

The entries in VALUE are joined into a single string using SEPARATOR as an in-between value.

Description

Joins the values in the ARRAY into a single STRING value using a separator. When VALUE is not an ARRAY, it is coerced into one using the ARRAY operation. Before joining the entries together, they are each converted into a string using the STRING operation. If SEPARATOR is not a STRING, it is coerced into one using the STRING operation.

Examples

ARRAY_JOIN([]) # returns ""
ARRAY_JOIN(["a", "b", "c"]) # returns "abc"
ARRAY_JOIN(["a", "b", "c"], ", ") # returns "a, b, c"
ARRAY_JOIN([1, 2, 3], " + ") returns "1 + 2 + 3"