Following template with any array as content:
{%- for datapoint in content -%}
{%- assign breaker = (forloop.index | modulo: 4) -%}
{{breaker}}
{% if breaker == 0 %};
{% endif %}
{%- endfor -%}
Produces this output in visual studio code, and is in line with documentation:
1 2 3 0 1 2 3 0 1 2 3 0
(I added space instead of new line for readabillity)
Running the same template on azure logic app will produce this output
1 2 3 4 5 6 7 8 9 10 11 12
Are there any other ways of achieving the same output using Liquid templates, without modulo? Seems like the | might be an issue,
{%- assign arraysize = content | size -%}
doesnt seem to work either, but
{%- assign arraysize = content.size -%}
works fine. However I am not sure how to use modulo in this way.