Reputation: 89
I need to iterate over this map in freemarker language.
public static void main(String[] args) {
Map<String, Map<String, Map<String,String>>> map = new HashMap<>();
}
on the basis of each string i need to get map then again on the basis of string again map is needed. thanks
Upvotes: 0
Views: 1266
Reputation: 58792
It seems there is three level nested map, you can drill down using list and you can show both key and value
Listing hashes is very similar, but you need to provide two variable names after the as; one for the hash key, and another for the associated value.
<#list map?values as vals>
<#list vals?values as innervals>
<#list innervals as name, innerValue>
${name} value = ${innerValue}
</#list>
</#list>
</#list>
Upvotes: 1