title: create array and get value in array Shopify
body: <p>I want to create array and which I am creating in loop but I want that array to be declared out of the loop.This to be done in shopify: I am using: </p>
  
  <pre><code>{% assign productid="" %}
    {% for product in collections.frontpage.products %}
    {% assign product =  product.id | split: ", " %} 
  {% endfor %}
  {{product}} // should return value 3,4,4 but not returning 
  </code></pre>
  
  <p>My explanation is not good But I tried my best to explain .Please can any one help me in this.</p>