Loop by integer value with Nunjucks Templating
问题 I'm quite new to nunjucks and from what I have read this is not possible, but I was wondering if anyone had come up with a way of doing this. I am basically looking to perform a for loop in a nunjucks template based on a value rather than an object's size. Say you pass the following data to a template. Assume the number of rooms value is the value of a selected option from a <select> element : data : { numberOfRooms : 4 } In traditional JS I could write a for loop and limit the loop based on