Filter
func Filter[K comparable, V any](mapInstance map[K]V, function func(key K, value V) bool) map[K]V
Filter takes a map with keys K and values V, and executes the passed in function for each key-value pair. If the filter function returns true, the key-value pair will be included in the output, otherwise it is filtered out.