I want to stop the cycle if the loop is 3.
If my array has 5 records, I need to show only 3 records
{% for image in post.images %}
{% if loop.index < '3' %}
{{ loop.index}}
{% endif %}
{% endfor %}
so I want show only 3 loop
1
2
3
solved