key
Key extracts a value from a map or slice by key path or index.
Key extracts a value from a map or slice by key path or index. Use dot notation to traverse nested maps.
Input
map array
Parameters
| # | Type | Required |
|---|---|---|
| 0 | string | yes |
Returns
any
Examples
{{ user | key:'name' }}
{{ config | key:'database.host' }}
{{ items | key:0 }}How is this guide?