Back to Lo

Core Topairs

docs/data/core-topairs.md

1.53.0168 B
Original Source

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

go
pairs := lo.ToPairs(map[string]int{"foo": 1, "bar": 2})
// []lo.Entry[string, int]{...}