title: Looping through JSON data not working as expected
body: <p>I have the following script which is not behaving the way I am expecting it to behave:</p>
  
  <pre><code>success: function( widget_shell ) 
  { 
      if( widget_shell.d[0] ) {
          for ( i = 0; i &lt;= widget_shell.d.length - 1; i++ ) {
             $( ".column_" + widget_shell.d[i].column_id ).append( "&lt;div class='widget_" + widget_shell.d[i].widget_id + "'&gt;" );
             $( ".widget_" + widget_shell.d[i].widget_id ).append( "&lt;div class='widget_content_" + widget_shell.d[i].widget_id + "'&gt;" );
             $( ".widget_" + widget_shell.d[i].widget_id ).append( "&lt;/div&gt;" );
             $( ".column_" + widget_shell.d[i].column_id ).append( "&lt;/div&gt;" );
          }
      }
  </code></pre>
  
  <p>This produces HTML like this:</p>
  
  <pre><code>&lt;div id="divMain"&gt;
      &lt;div class="column_1 ui-sortable"&gt;
          &lt;div class="widget_9"&gt;
              &lt;div class="widget_content_9"&gt;&lt;/div&gt;
              &lt;div class="widget_content_9"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="column_2 ui-sortable"&gt;
          &lt;div class="widget_9"&gt;
              &lt;div class="widget_content_9"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="column_3 ui-sortable"&gt;
          &lt;div class="widget_58"&gt;
              &lt;div class="widget_content_58"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When the JSON data looks like this:</p>
  
  <pre><code>{
      "d": [
          {
              "__type": "Widget_Shell",
              "column_id": 1,
              "widget_id": 9
          },
          {
              "__type": "Widget_Shell",
              "column_id": 2,
              "widget_id": 9
          },
          {
              "__type": "Widget_Shell",
              "column_id": 3,
              "widget_id": 58
          }
      ]
  }
  </code></pre>
  
  <p>So basically, I should be seeing only 1 widget per column based on the JSON data, which is fine, but for some reason, I am ending up with 2 contents in the first columns widget...</p>
  
  <p>Any idea why?</p>