Hi
I’m trying to break a for loop to stop the execution of a loop; is this possible with hubl?
Hi
I’m trying to break a for loop to stop the execution of a loop; is this possible with hubl?
Nope. But you can set a conditional inside the loop to ignore the next iterations like:
{% for var in vars %} {% if loop.index <= 4 %} do whatever {% endif %}{% endfor %}{% for var in vars %} {% if var.attribute == "filter" %} do whatever {% endif %}{% endfor %}Thanks for your response @Gonzalo. Great workaround. That’s what I used. I was hoping for a way to break it without having to go through the entire loop and run the condition but will have to go with this approach till a break is introduced.