kotlin.collections.filter

filter

inline fun <K, V> Map<out K, V>.filter(
    predicate: (Entry<K, V>) -> Boolean
): Map<K, V>

Returns a new map containing all key-value pairs matching the given predicate.

The returned map preserves the entry iteration order of the original map.