title: jquery looping array of arrays on $.ajax request
body: <p>I have an ajax request polling my server every 5 seconds which returns a json array of data that is available for an users shopping carts contents.</p>
  
  <p>The json is correctly formed and is being returned everytime without problem.</p>
  
  <p>JSON</p>
  
  <pre><code>[
      {
          "status": "success",
          "responsecode": "00",
          "data": [
              {
                  "partnumber": "Part 1",
                  "status": "true",
                  "quantity": "4",
                  "productid": "item-1",
                  "name": "Product 2",
                  "online": "1"
              },
              {
                  "partnumber": "Part 2",
                  "status": "false",
                  "quantity": "0",
                  "productid": "item-2",
                  "name": "Product 2",
                  "online": "1"
              }
          ]
      }
  ]
  </code></pre>
  
  <p>Jquery function to process the ajax response</p>
  
  <pre><code>function doPoll(){   
      $.ajax({
             type: "get",
             url: "/assets/static-pages/shopping-cart/?action=check-cart",           
              dataType : 'json',
              success: function(html) {
              $.each(html, function(key, value) 
                  {
                      console.log(value.data[key].partnumber);
                  }
               );
               }
      });
      //   setTimeout(doPoll,10000);
  }
  </code></pre>
  
  <p>every time it loops, all it does is return the first item in the array, I would very much like to loop the array and return all that resides within the "data" array so I can manipulate the UI based on its contents, but for some reason I cant figure out how to get all the data.</p>
  
  <p>any suggestions greatly appreciated</p>