github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/job-specification/hcl2/functions/collection/values.mdx (about) 1 --- 2 layout: docs 3 page_title: values - Functions - Configuration Language 4 description: The values function returns a list of the element values in a given map. 5 --- 6 7 # `values` Function 8 9 `values` takes a map and returns a list containing the values of the elements 10 in that map. 11 12 The values are returned in lexicographical order by their corresponding _keys_, 13 so the values will be returned in the same order as their keys would be 14 returned from [`keys`](/docs/job-specification/hcl2/functions/collection/keys). 15 16 ## Examples 17 18 ```shell-session 19 > values({a=3, c=2, d=1}) 20 [ 21 3, 22 2, 23 1, 24 ] 25 ``` 26 27 ## Related Functions 28 29 - [`keys`](/docs/job-specification/hcl2/functions/collection/keys) returns a list of the _keys_ from a map.