in runtime i will have a dynamic dictionary object return to me
e.g var objectFromApi = {"A ":"I am A","B":"I am B","C":"I am C"}
i cannot do objectFromApi ["A"] to get the value, since i won`t able to know the key.
is there a way to print all the key and its value?
is there something like
for(j=0;j<objectFromApi.length;j++)
{
console.debug(objectFromApi[j].Key +" " + objectFromApi[j].Value);
}
Thanks
for(var name in objectFromApi )
{
if (objectFromApi.hasOwnProperty(name))
{
}
}
http://jsfiddle.net/V6t6Y/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With