Skip to main content

$$join

Joins an array of inputs as strings with an optional delimiter (default is ""). Null values are omitted.

Usage​

{
"$$join": [ /* values */ ],
"delimiter": /* delimiter string */,
"prefix": /* prefix string */,
"suffix": /* suffix string */
}
"$$join([delimiter],[prefix],[suffix]):{input}"

Returns​

string

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimaryarrayYesArray of elements
delimiterstring""Delimiter to join any 2 adjacent elements
prefixstring""A string to prefix the result
suffixstring""A string to suffix the result

Examples​

Input

Definition

Output

["a", null, null, "B"]
{ "$$join": "$" }
"aB"
["Hello", "World"]
{ "$$join": "$", "delimiter": " " }
"Hello World"
["Hello", "World"]
{ "$$join": "$", "delimiter": " ", "prefix": "<" }
"<Hello World"
["Hello", "World"]
{ "$$join": "$", "delimiter": " ", "prefix": "<", "suffix": ">" }
"<Hello World>"
["a","b"]
"$$join:$"
"ab"
["a","b"]
"$$join(','):$"
"a,b"
["hello","world"]
"$$join( ,<):$"
"<hello world"
["hello","world"]
"$$join( ,<,>):$"
"<hello world>"