Awee

filter

Filter returns a subset of a slice where a nested field matches a value.

Filter returns a subset of a slice where a nested field matches a value. Supports dot notation for nested field access.

Input

array

Parameters

#TypeRequired
0stringyes
1anyyes

Returns

array

Examples

{{ items | filter:'status','active' }}
{{ users | filter:'role','admin' }}
{{ posts | filter:'meta.published',true }}

How is this guide?

On this page