Loop by integer value with Nunjucks Templating Loop by integer value with Nunjucks Templating node.js node.js

Loop by integer value with Nunjucks Templating


you should be able to use the range construct - https://mozilla.github.io/nunjucks/templating.html#range-start-stop-step

{% for i in range(0, data.numberOfRooms) -%}  {{ i }},{%- endfor %}