Files
opentf/website/docs/configuration/functions/values.html.md
Martin Atkins 1360948a41 website: document the functions "keys", "lookup", and "values"
I missed these on the first pass because in the legacy function table they
are, for some reason, added in a different place than the others.
2018-10-16 18:49:20 -07:00

655 B

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
functions values function docs-funcs-collection-values The values function returns a list of the element values in a given map.

values Function

values takes a map and returns a list containing the values of the elements in that map.

The values are returned in lexicographical order by their corresponding keys, so the values will be returned in the same order as their keys would be returned from keys.

Examples

> values({a=3, c=2, d=1})
[
  3,
  2,
  1,
]
  • keys returns a list of the keys from a map.