swift check dictionary has key

Swift
let hasKey = myDictionary.keys.contains("myKey")
Source

Also in Swift: