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 are misunderstanding the result. The String initializer does not return an optional. It returns the string representation of an optional. It is an non-optional String with value "Optional(42)".
String
"Optional(42)"