liquid (1)

Slicing an array for assignment in LiquidApril 29, 2017

Need to assign a new variable with a subset of an array. Insert slicing.

While liquid has a way to ensure that a for loop will exit once it hits a certain iteration. You may need to slice an array of items outside of a for loop. After some time on Google, I couldn’t find any straight forward way of getting a subset of an array in liquid. I came across a site with some unofficial documentation about strings in liquid. It said it was possible to slice strings. Knowing…Keep Reading


© Matthew Sessions 2022