Hey!
So I’m making this for loop:
{% for product in collections[‘nameOfCollection’].products %}
Do something…
{% endfor %}
Now, it works perfectly, but what if I don’t want to hard code the ‘nameOfCollection’?
What if instead of that I’d like to put a variable value? How can I do it?
I’ve tried:
{% for product in collections[‘{{myVariable}}’].products %}
{% endfor %}
But it doesn’t work,
Does anyone have an idea of how to do this?