swift how to check the value for a key in a dictionary code example Example: swift check dictionary has key let hasKey = myDictionary.keys.contains("myKey")