Awee

map

Map converts a slice of maps into a map keyed by the given field's string value.

Map converts a slice of maps into a map keyed by the given field's string value.

Input

array

Parameters

#TypeRequired
0stringyes

Returns

map

Examples

{{ users | map:'id' }}
{{ tags | map:'slug' }}

How is this guide?

On this page