new

improved

New tag: push

Improvement for adding items to an array.
Previously you could add items to an array using push filter like so:
{% json array_example %}
[ 1,2,3 ]
{% endjson %}
{% assign array_example = array_example | push: 4 %}
This method is not efficient for large arrays because every time time an item is pushed to array - new array is created.
With
push
tag you add an item to array without creating a new array.
{% json array_example %}
[ 1,2,3 ]
{% endjson %}
{% push array_example, 4 %}