title: Create a simple array in liquid
body: <p>I need to make an associative array of products by their quantity. How do I convert this one liner from php to liquid</p>
  <pre><code>foreach(items as item) $product[$item.product_id] += $item.quantity
  </code></pre>
  <p>Best I came up was with this</p>
  <pre><code>{% for item in cart.items %}
      {% assign product[item.product_id] = 0 | plus product[item.product_id] | plus item.quantity %}
  {% endfor %}
  </code></pre>