assign
Assigning into arrays
{% assign x = array %}
{% assign x[0] = "one" %}
{% assign x[x.size] = "two" %}
{% assign the_third_zero_based_index = 2 %}
{% assign x[the_third_zero_based_index] = "three" %}
{{ x | json }}["one","two","three"]Assigning into hashes
Last updated
Was this helpful?