How to populate the page via JQuery after I have the json returned
<p>Ok so i have the json object returned back from my script and I have all the data but how do I put it on the page. Here is what i have so far </p>

<p>I have a php page which has a loop like this</p>

<pre><code>&lt;div class="main-blue"&gt;
&lt;div class="blue-items"&gt;
&lt;?php foreach ($related as $row_r) { ?&gt;
&lt;div class="item-blue"&gt;
&lt;div class="image left"&gt;
&lt;img src="&lt;?php print $row_r['image'] == "" ? "css/images/blue-png2.png" : "css/images/{$row_r['image']}" ?&gt;" alt="" /&gt;
</code></pre>

<p>As you can see the Php loop is looping through the array $related which has lots of products. I have an ajax call that can change the data in this array and regenerate the page. I have the new data from a getjson call</p>

<pre><code> $.getJSON('function.php?type=piz&amp;count=5', function(data) {
 $(data).each(function(key, value) {
   console.log(value);
   });
});
</code></pre>

<p>How do i recreate the page using the new data</p>
