First of all I am not sure whether it is actually possible in javascript, but still I felt it's worth asking.
Ok, so what I am trying to do is get the names of the members of an array (or object as you might say) dynamically at runtime.
Let me explain. I have an object like this :
Results :-
member_name1 : value_1
member_name2 : value_2
member_name3 : value_3
Here, Result
is the name of the object which has members like member_name1
, member_name2
, etc and theu have values like value_1
and value_2
respectively. What I am trying to do is get the name of the members like member_name1
this at runtime; not it's value. I access the value by Results.member_name1
generally.
I hope I am able to portray the issue!
Below is a screenshot of the object :
https://i.stack.imgur.com/dzAgm.png
Thanks!