javascript - How can I get the key of my object? -


i have following object:

var text = { 'one' : 1, 'two' : 2, 'three' : 3}; 

i want write key 'one' console.log(). how can it?

try:

var text = { 'one' : 1, 'two' : 2, 'three' : 3}; (var in text){     console.log(i); } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -