Iterate though hashtable to return element keys not values

I am trying to figure out how you would iterate through a hashtable and get their key names or element names instead of their value. So for instance:

[client_name, Mike]
[age, 26]
[height, 5"3"]

So for instance if I wanted to do a for loop or for each I would be able to return "client_name, age, and height" rather then their values. I am working in Javascript.

Can anyone help me out?

You can just use the Keys property.

For example:

var table:Hashtable = new Hashtable();

table["client_name"] = "Mike";

table["age"] = 26;

table["height"]= "5\"3\"";

for(var str:String in table.Keys){

    //do stuff


this is old, probably you’ve found the solution and i’m sure that it’ll will help someone else.

var hash = {
client_name: Mike,
age: 26,
height: 5"3"

for (item in hash.Key){