vbscript Dictionary Objects Delete Key/ keys from Dictionary


Example

set oDic = CreateObject("Scripting.Dictionary")
oDic.add "USA", "United States of America"
oDic.add "UK", "United Kingdom"
oDic.add "CAN", "Canada"

' Delete only if Key exists
If oDic.Exists("UK") Then
    oDic.Remove "UK"
End If    

' Delete all keys from Dictionary
oDic.removeAll 

Set oDic = Nothing