I have a dictionary and I want to use some of its values as a key for another dictionary:
let key: String = String(dictionary[\"anotherKey\"])
You can also avoid force unwrapping by using default for the case that there is no such key in dictionary
var dictionary = ["anotherkey" : 42] let key: String = String(dictionary["anotherkey", default: 0]) print(key)