Skip to content

Transformation

This section contains functions that transform a map into another object.

Keys

Keys returns a list of keys from a map.

Usage:

mapx.Keys(map[string]int{"a": 1, "b": 2}) // []string{"a", "b"}

Values

Values returns a list of values from a map.

Usage:

mapx.Values(map[string]int{"a": 1, "b": 2}) // []int{1, 2}