jQuery JSON nested loops
<p>I have the following script:</p>

<pre><code>function drawDimensions(divid) {
    $.getJSON('dimensions.json', function(data) {
        $.each(data, function(index) {
            var ppp = $('#' + divid).append("&lt;div class='dTitle'&gt;&lt;img src='images/cleardot.gif' /&gt;" + index + "&lt;/div&gt;&lt;br&gt;");
          $.each(this, function(k, v) {
              $('&lt;div&gt;').append(v).appendTo(ppp);
          });
        });
    });
}
drawDimensions('dim');
</code></pre>

<p>I'm trying to nest the divs so the values from the first loop will be the parents of the divs on the second loop.</p>

<p>What am I doing wrong? the second loop divs are not nested within the first one but simply appended after the first ones..</p>
