I'm new to TWIG...
Within a TWIG template, I need to create a new array of objects that is a subset of an existing array of objects (products).
So far, I have this:
{% set onlyLimitedAmtProds = [] %}
{% for product in products %}
{% if product.in_stock_amount < 3 %}
{% set onlyLimitedAmtProds = onlyLimitedAmtProds|merge(product) %}
{% endif %}
{% endfor %}
The above generates an error of:
"The merge filter only works with arrays or hashes; array and object given."
I'm not sure of the syntax to make this work.