values(mapping) returns a list of all values in mapping, in the same order as the keys returned by keys (sorted lexicographically by key).
Signature
Example
Extract all configured service ports from a map and validate that none are in the reserved range before starting the stack:computed.port_list becomes [3000, 8080, 9090] (sorted by key: dashboard, api, metrics).
Notes
- The order of values corresponds to the lexicographic order of their keys, not the order they were declared.
valuesalso works on objects. When applied to an object, it returns the attribute values as a tuple ordered by lexicographic key order.- To get keys, use
keys. To look up a specific value by key, use bracket notation orlookup.