TruMan1
TruMan1

Reputation: 36158

How to create key/value pairs in ASP?

How do I do something like this in ASP / VBScript?

Dim pairs
pairs= Dictionary(String, Integer)()
For Each item As String In storage
    Dim temp
    temp = item.Split(".")
    pairs.Add(temp(0), temp(1))
Next

Upvotes: 2

Views: 3290

Answers (1)

Use the "Scripting.Dictionary" object like this:

set objPairs = Server.CreateObject("Scripting.Dictionary")
objPairs.add temp(0), temp(1)

Upvotes: 3

Related Questions