Back to Lo

Core Omitbykeys

docs/data/core-omitbykeys.md

1.53.0187 B
Original Source

Returns a map of the same type excluding the provided keys.

go
m := lo.OmitByKeys(map[string]int{"foo": 1, "bar": 2, "baz": 3}, []string{"foo", "baz"})
// map[string]int{"bar": 2}