map
Generates an array of values derived from a specified property of elements within an existing array.
Parameters
array{Array}: The array to map. This parameter is required.key{String}: The property name of the array elements. This parameter is required.returns{Array}: The resulting array.
Usage
{{ map objArr "name" }}
Example
{{ assign 'product_titles' (map collection.products 'title') }}
{{ join product_titles ', ' }}
Was this article helpful to you?