Skip to main content
keys(inputMap) returns a list of all keys in inputMap, sorted lexicographically.

Signature

Example

Iterate over a map of environment-specific replica counts and print a summary before deploying:

Notes

  • Keys are returned in sorted order, which makes the output deterministic across runs.
  • keys also works on objects. When applied to an object, it returns the attribute names as a tuple sorted lexicographically.
  • To get the values, use values. To get both, iterate over the map directly in a shell command.