strjoin()

Joins the elements of the given array into a single string. The elements of the string are separated with a specified separator.

Syntax

strjoin(DELIMIT_CHAR, ARRAY)
Required Parameter
DELIMIT_CHAR
String to use as an element separator. If the separator contains an expression instead of a constant, a syntax error occurs.
ARRAY
Array whose elements are to be joined. The function returns null if the array is null, and if the element of the array is null, null is displayed in the merged string.

Usage

json "{}" | eval merged=strjoin(",", null)
  => null

json "{}" | eval merged=strjoin(",", array(1, 2, 3))
  => "1,2,3"