1. Home
  2. ›
  3. Liquid
  4. ›
  5. Array

You cannot create an array directly in Liquid, however you can go around it by splitting a string.

#liquid#array
 {%  assign listOfItems = "cup,pen,apple,book" | split: ',' %}
copy
Full Liquid cheatsheet