ASP Dictionary.Keys Method
The ASP Dictionary.Keys Method is used for returning an array of all the keys in a Dictionary Object.
Syntax:
DictionaryObject.Keys
Example Code: Below code demonstrates the ASP Keys Method.
ASP
<%
dim d,a,i
set d=Server.CreateObject( "Scripting.Dictionary" )
d.Add "m" , "mango"
d.Add "e" , "Elephant"
d.Add "n" , "Nagaland"
Response.Write("
<p>Key values:</p>
")
a=d.Keys
for i=0 to d. Count -1
Response.Write(a(i))
Response.Write( "<br>" )
next
set d=nothing
%>
|
Output:
Key values:
m
e
n
Last Updated :
31 Mar, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...