I want to create a Dictionary that does not limit the key type (like NSDictionary)
Dictionary
NSDictionary
So I tried
var dict = Dictionary
You can now use AnyHashable which is a type-erased hashable value, created exactly for scenarios like this:
AnyHashable
var dict = Dictionary()