How to iterate over HashMap in Kotlin?
Kotlin
typealias HashMap = HashMap (source)
Another way that has not been mentioned is:
val mapOfItems = hashMapOf(1 to "x", 2 to "y", -1 to "zz") mapOfItems.map { (key, value) -> println("$key = $value") }