Skip to main content

implode

Given an array of strings (pieces), will return a concatenation of each string separated by glue.

Given an array of objects (pieces), will extract from each object the property property_name and will return a concatenation of each object's property property_name separated by glue.

Usage

{{implode pieces glue=", " property_name="address"}}

Arguments

pieces
An array of strings or objects.

glue
A string that will be inserted between each array item in pieces

property_name
The name of the property to extract from each object in pieces.

Examples

Render an email's recipient list to a comma-separated list

{{implode email.to glue=", " property_name="address"}}