Freemarker has two collection datatypes, lists and hashmaps Is there a way to iterate over hashmap keys just as we do with lists?
So if I have a var with data lets s
Edit: Don't use this solution with FreeMarker 2.3.25 and up, especially not .get(prop). See other answers.
.get(prop)
You use the built-in keys function, e.g. this should work:
<#list user?keys as prop> ${prop} = ${user.get(prop)} #list>