Awee

Collections

Work with arrays and maps — sort, filter, find, extract keys, and reshape data.

Collections

ModifierDescription
filterFilter returns a subset of a slice where a nested field matches a value.
findFind returns the first element in a slice or map where a field equals the given value.
firstFirst returns the first character of a string or the first element of a slice.
hasHas returns true if the slice or map contains the given value.
isIs returns true if the value equals any of the given parameters.
keyKey extracts a value from a map or slice by key path or index.
lastLast returns the last character of a string or the last element of a slice.
mapMap converts a slice of maps into a map keyed by the given field's string value.
mergeMerge converts a slice of maps into a map keyed by the given field's string value.
sortSort sorts a slice in ascending or descending order.
wrapWrap wraps the value in a map under the given key.

How is this guide?

On this page