Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:04
What would you like to do?
getting an array of Object properties in older Versions of JavaScript
Object.objToArray = function(obj) {
var array = [];
for (key in obj) {
if (obj.hasOwnProperty(key)) array.push(key);
return array;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment