swift dictionary how to check dictionary container kye code example Example: swift check dictionary has key let hasKey = myDictionary.keys.contains("myKey")