You would iterate inside the object with a for loop: for(var i in foo){ alert(i); // alerts key alert(foo[i]); //alerts key's value }