I want to know, how to put different keys and values into a dictionary, I see many codes that use the any, like this:
var dict = [String : Any]()
In that code, we need to have a String key and different types of values (bool, double, int, float). In my case I want to put different Types of values and keys, like that code below:
var dicionario0 = ["Ui": "Valor1", 5 : "ol", "Spt" : 78]
dicionario0[98] = 900
dicionario0[122] = "Valores"
dicionario0["Olas"] = 2333321
dicionario0[23.5] = 900
dicionario0[true] = 900
For that I try:
var dict = [Any:Any]()
But not work, I want Any for Keys and Any for Values, like the variable dicionario0, How I can do this?