[color=green]今天用到了FreeMaker的集合,要用到List和Map的嵌套,可能时候由于我的数据结构定义的不好,但是又想学学这个怎么定义,所以就研究了一下,分享一下。
FreeMarker里面List和Map的嵌套:[/color]
FreeMarker里面List和Map的嵌套:[/color]
<#list myList as listItem>
<#assign keys = myList?keys>
<#list keys as key>
<label>This is the key: ${key}.</label>
<label>This is the value: ${myList[key]}</label>
</#list>
</#list>