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
| # | Type | Required |
|---|---|---|
| 0 | any | yes |
| 1 | any | no |
Returns
bool
Examples
{{ tags | has:'featured' }}
{{ items | has:'status','active' }}
{{ config | has:'debug_mode' }}How is this guide?