join
Joins the items of a list into one text with a separator.
Details #
join(list, separator) takes exactly two arguments and returns text. Each item is turned into text first (numbers without a trailing .0, nested lists and records as compact JSON).
Parameters #
Takes 2 arguments.
{{ join(text, b) }}
Examples #
join(["a","b","c"], ", ")→
a, b, cjoin(split("a b c", " "), "-")→
a-b-cjoin(nums, "+")→
1+2.5+3| Sample variable | Value |
|---|---|
nums | [1, 2.5, 3] |
Gotchas #
The first argument must be a list. Anything else is an error:
join() needs a list, got text. Use split to make a list from text.