Check If A Key Is In A Map

[Solved] Check If A Key Is In A Map | Go - Code Explorer | yomemimo.com
Question : How to check whether key or value exist in Map?

Answered by : jimmy-h

myMap.values.exists(_ == 3)
myMap.exists(_._2 == 3)

Source : https://stackoverflow.com/questions/10567744/how-to-check-whether-key-or-value-exist-in-map | Last Update : Fri, 03 Jun 22

Answers related to check if a key is in a map

Code Explorer Popular Question For Go