I'm new to programming, so I'm sorry if my question seems dumb. I want to ask, is there a way to return keys from Multi.Dictionary
when I have a value?
This is my code:
Dim myDict
Set myDict= Server.CreateObject("Multi.Dictionary")
myDict.UniqueKeys = False
'Fill dictionary with some data
myDict("param1") = "value1"
myDict.Add "param2", "value2"
myDict.Add "param2", "value2.2"
'Get dictionary Keys
Keys = myDict.Keys
Items = myDict.Items
For Z = 0 To UBound(Items)
Response.Write(Keys(Z) & " " & Items(Z) & "<br>")
Next
And now returns
Subtitle out of range: '2'
This is normal because I loop 3 times, so far I only have 2 keys.
So, you can get this result:
Param1: "value1"
Param2: "value2"
Param2: "value2.2"
source
share