how to check if an object is in a dictionary's keys swift 4 code example Example: swift check dictionary has key let hasKey = myDictionary.keys.contains("myKey")