Back to Lo

Core Findkey

docs/data/core-findkey.md

1.53.0152 B
Original Source

Returns the first key whose value equals the provided value.

go
k, ok := lo.FindKey(map[string]int{"foo":1, "bar":2, "baz":3}, 2)
// "bar", true