How to list the properties of a javascript object


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var getKeys = function(obj){
  2. var keys = [];
  3. for(var key in obj){
  4. keys.push(key);
  5. }
  6. return keys;
  7. }

URL: http://stackoverflow.com/questions/208016/how-to-list-the-properties-of-a-javascript-object

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.