Awee

has

Has returns true if the slice or map contains the given value.

Has returns true if the slice or map contains the given value. For a slice of maps, provide a key and value to match on a specific field.

Input

array map

Parameters

#TypeRequired
0anyyes
1anyno

Returns

bool

Examples

{{ tags | has:'featured' }}
{{ items | has:'status','active' }}
{{ config | has:'debug_mode' }}

How is this guide?

On this page