swift check dictionary and key/value exist code example Example: swift check dictionary has key let hasKey = myDictionary.keys.contains("myKey")