You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

join()

Usage

join(collection, separator)

Description
Joins the given collection of strings into a single string, separated by the given separator. This method is often used in conjunction with find() and extract() to create comma-separated lists of entity names etc. The merge() function can be used to create a list of strings like in the following example.

Examples

${join(merge('one', 'two', 'three'), ', ')}

results in

one, two, three

Search results for "join()"

join()

Joins the given collection of strings into a single string, separated by the given separator. This method is often used in conjunction with find() and extract() to create comma-separated lists of entity names etc. The merge() function can be used to create a list of strings like in the following example.

join(collection, separator)

StructrScript

The above example shows the use of three different built-in functions. The find() function executes a database query and returns the result collection. extract() converts the collection of database objects into a collection of strings and join() concatenates the collection of strings into a single string, using the given separator between the elements.