Get values inside JavaScript object

 
//data is javascript object with unknown ids
 
//This loop with fetch all index name as well as their values
for (var i in data)
{
    alert('theStatus[\''+i+'\'] is ' + data[i])
}
Category(s): Javascript

Leave a Reply

Your email address will not be published. Required fields are marked *

*

 

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">