 <p>I'd recommend not using synchronous ajax request, it would be better to use a callback. You could itterate through every house object like so:</p> <pre><code>function displayJson() { var i,h,ret=[]; var myDiv =document.getElementById("content"); // houseone and housetwo for (h in houses) { // houseone and housetwo are arrays: [house,house,house] // for every house in this array do: for(i=0;i&lt;houses[h].length;i++){ var home = houses[h][i]; ret.push(houseDetails(home,i)); } } //setting innerHTML is resource intensive // no reason to do this within a loop. myDiv.innerHTML=ret.join(""); } </code></pre>