HTTP & JSON
jsonJoinArray
$jsonJoinArray[]
Joins all elements of a JSON array into a single string using the specified separator.
Syntax
$jsonJoinArray[key;separator]
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| key | string | check_circle Required | — | The key identifying the JSON array to join. The key must exist and contain an array. |
| separator | string | check_circle Required | — | The string to insert between each element. Can be any text including spaces, symbols, or HTML. |
Return Value
string
A single string with all array elements concatenated, separated by the given separator. Returns an empty string if the array is empty.
$jsonJoinArray combines all elements of a JSON array into a single string with a separator between each element — equivalent to JavaScript’s Array.join(). This is the inverse of $jsonArray which splits a string into an array. Use \n for line breaks in embeds, or custom separators like bullets or HTML tags.
Examples
Comma-separated list
$jsonParse[{"tags":["bot","automation","discord"]}]
Tags: $jsonJoinArray[tags;, ]
Line-break separated for embeds
$jsonParse[{"players":["Alice","Bob","Charlie"]}]
$title[Leaderboard]
$description[$jsonJoinArray[players;\n]]
Custom HTML separator
$jsonParse[{"items":["apple","banana","cherry"]}]
Shopping list: $jsonJoinArray[items; • ]