title: Output only size variants in Shopify's liquid logic
body: <p>I've <a href="https://github.com/devtees/shopify-product-filter" rel="nofollow noreferrer">created a way</a> to filter products in my Shopify shop by size on any given collection page. However, it only works when size is the only variant.</p>
  
  <p>For my shop that's fine, but since I've open sourced the filter, I'd like it to work for just one variant even when there are more than one variants.</p>
  
  <p>The trouble seems to be that a line like <code>{% for variant in product.variants %}</code> works for just one present variant (e.g. size), but I cannot seem to pass a size argument such as <code>{% for variant in product.variants.size %}</code>. </p>
  
  <p>I even tried <a href="https://docs.shopify.com/themes/liquid-documentation/objects/variant#variant-option1" rel="nofollow noreferrer">the recommended</a> <code>variant.option1</code> (i.e. <code>{% for variant in product.variants.size.option %}</code>) but to no avail.</p>
  
  <p>Is there some way of outputting just an array of the size variants even when there are multiple variants for a product?</p>
  
  <p><a href="https://github.com/devtees/shopify-product-filter/issues/2" rel="nofollow noreferrer">Further context.</a></p>
  
  <p>Also, found this <a href="https://stackoverflow.com/questions/24290313/get-one-variant-in-shopify">similar question</a>, but it was not similar enough to provide a solution for my use case.</p>