How to loop through Map in Thymeleaf

后端 未结 2 1638
一个人的身影
一个人的身影 2021-02-01 01:00

I am trying to understand how to loop through all entries in a Map in Thymeleaf. I have a domain object being processed by Thymeleaf that contains a Map.

How do I loop

2条回答
  •  梦如初夏
    2021-02-01 01:30

    In case you have a List as the value. For example, when you have a map with key being the category, and value being a list of items pertaining to that category, you can use this:

    keyvalue
    Some name Some name Some name Some name Some name

提交回复
热议问题