Kotlin HashMap filterKeys()
Syntax & Examples
Syntax of HashMap.filterKeys()
The syntax of HashMap.filterKeys() extension function is:
fun <K, V> Map<out K, V>.filterKeys( predicate: (K) -> Boolean ): Map<K, V>
This filterKeys() extension function of HashMap returns a map containing all key-value pairs with keys matching the given predicate.