title: Output response details via loop
body: <p>I submit some data via jQuery .ajax() and receive some data back via response. I need to output the data on my page. For example this is one of the responses I get:</p>
  
  <pre><code>{ 
    "res": 1, 
    "item": [
        {"id":"1","desc":"blue box","rating":"1"},
        {"id":"2","desc":"red ball","rating":"5"}
    ] 
  }
  </code></pre>
  
  <p>I output this response via a loop like this:</p>
  
  <pre><code>...
  success: function (response) {
  
      for (var i = 0; i &lt; response.item.length; i++){
           var item = response.item[i].id,
               desc = response.item[i].desc,
               rate = response.item[i].rating;
  
           $('#em' + response.res).append(item+'. '+ desc + ' Rating:' + rate);
      }
  }
  </code></pre>
  
  <p>Unfortunately what I get is two rows of the same item. What am I missing?</p>