1. Home
  2. Liquid
  3. 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