Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Getting object property names as a string


  • From: ryan at ryancannon.com (Ryan Cannon)
  • Subject: [Javascript] Getting object property names as a string
  • Date: Wed May 24 12:50:52 2006

Greetings, this feels like a silly question, but I'm looking for a  
way to access an object's property names as a string. For example:

var test = { foo: 'bar' };
alert(test.foo) // alerts 'bar'

how do I alert('foo') ?
-- 
Ryan

http://RyanCannon.com/