Back to Lo

Core Entries

docs/data/core-entries.md

1.53.0195 B
Original Source

Transforms a map into a slice of key/value pairs.

go
entries := lo.Entries(map[string]int{"foo": 1, "bar": 2})
// []lo.Entry[string, int]{ {Key: "foo", Value: 1}, {Key: "bar", Value: 2} }