Posted By

agarcim on 07/11/12


Tagged

JavascriptjQueryStrings


Versions (?)

Iterate over properties of and object


 / Published in: JavaScript
 

Iterate over the properties of an object

  1. var object =
  2. {
  3. a:10;
  4. b:20;
  5. s:'hello'
  6. };
  7.  
  8.  
  9. $.each(object, function(name, value)
  10. {
  11. console.log(name+':'+value);
  12. });

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: refuty on July 11, 2012

ah, good stuff. thanks!

You need to login to post a comment.