title: Javascript - loop through object based on the qty variable
body: <p>I asked a similar question earlier (albeit slightly different)..</p>
  
  <p>Basically using the jsfiddle here <a href="http://jsfiddle.net/WTMBA/" rel="nofollow">http://jsfiddle.net/WTMBA/</a></p>
  
  <p>I would like to loop through the object and based on the number of qty variable loop through and add the object values to an array.</p>
  
  <p>e.g</p>
  
  <pre><code>[Object { url="http://domain.com/abc", qty="1", price="2.99" }, Object { url="http://myurl.com/cde", qty="3", price="64.11" }]
  </code></pre>
  
  <p>The quantify() function should return this as an array with 4 items, as the first item in object has a qty value of 1, and the second value has a quantity of 3 (1+3)</p>
  
  <p>The return array from the quantify function should be structured to include the condition, url &amp; price (see fiddle)</p>
  
  <p>Can anyone suggest how I should edit the quantity function to do this?</p>