Is there a way to do a loop in Thymeleaf without a list?
I\'d like to essentially convert this snippet to Thymeleaf:
You can use the special thymleaf iteration variable inside the each block.
This special variable name is the name of your element variable concatenate with the keyword 'Stat'
(ex: elt -> eltStat
)
This variable gives you many information related to the iteration.
You can also specify this variable name after your element variable. For example:
Onions
2.41
yes
More information in the official documentation below:
http://www.thymeleaf.org/doc/tutorials/2.1/usingthymeleaf.html#keeping-iteration-status