Files
lo/docs/data/core-pickbyvalues.md
T
2025-10-06 17:15:49 +02:00

627 B

name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
name slug sourceRef category subCategory playUrl variantHelpers similarHelpers position signatures
PickByValues pickbyvalues map.go#L130 core map https://go.dev/play/p/1zdzSvbfsJc
core#map#pickbyvalues
core#map#pickby
core#map#pickbykeys
core#map#omitby
core#map#omitbykeys
core#map#omitbyvalues
80
func PickByValues[K comparable, V comparable, Map ~map[K]V](in Map, values []V) Map

Returns a map of the same type filtered by the provided values.

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