Loop over java map with scaled mustache implementation

Can a mustache go in cycles on a Java map? My goal:

Map<Integer, String> mapTest

Tried this in my mustache pattern:

{{#mapTest}}
  {{.}}
{{/mapTest}}

This displays the string representation ( mapTest.toString()) of the entire object, but does not create loops at all.


Update: when searching by source I get closer, but still not sure how to do it. https://github.com/scalate/scalate/blob/ec981338c067fcf37106fb5f3bdf2fa8c4e458ca/scalate-core/src/main/scala/org/fusesource/scalate/mustache/Scope.scala#L124-125

+3
source share
1 answer
+2
source

Source: https://habr.com/ru/post/1786514/


All Articles