is there are a better way than this for getting ke...
# codereview
t
is there are a better way than this for getting key by value?
Copy code
val key = myMap.filterValues { it == "value" }.keys.firstOrNull()
a
Copy code
myMap.entries.firstOrNull { it.value == value }?.key
👍 1
t
Thanks!