Skip to content

Instantly share code, notes, and snippets.

@wholypantalones
Created November 28, 2012 15:51
Show Gist options
  • Select an option

  • Save wholypantalones/4162116 to your computer and use it in GitHub Desktop.

Select an option

Save wholypantalones/4162116 to your computer and use it in GitHub Desktop.
json loop
var lookup = [];
var i = 0;
for (var name in obj) {
if (obj.hasOwnProperty(name)) {
lookup[i] = obj[name];
i++;
}
}
console.log(lookup[2]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment