retrieving name of an object
hi all,
assume I've got this obj instanciated:
myObj={x:"1",y:"2",z:"3"};
then having a reference to my myObj I want to retrieve all the object names and the assigned values to each. what shall I do?
myObj[0], myObj[1] and myObj[2] give me the value of the x, y and z respectively but how about the names themselvs(here x, y and z). how shall I retrieve the names too?
|