This example enumerate all the associations of the root node "person".Each association value is a nodeRef to a node of type cm
ersonHence, this freemarker script list the usernames associated with the current person : allow to represent a human hierarchy inside a company.In two steps :1) Create the Map "as string"2) Cast the string to a Map object with the instruction :<#assign map = mapAsString?eval/>
3) Test for NON existence of a key in the map :<#if !map["keynotexist"]??>
<#assign mapAsString = "{"/>
<#assign first = true />
<#list person.assocs["cm:subscribedBy"] as subscriber>
<#if first = false>
<#assign mapAsString = mapAsString + ","/>
</#if>
<#assign mapAsString = mapAsString + "\"" + subscriber.properties["userName"] + "\":" + "\"" + subscriber.properties["userName"] + "\""/>
<#assign first = false/>
</#list>
<#assign mapAsString = mapAsString + "}"/>
<#assign map = mapAsString?eval/>
<p><i>map size: ${map?size}</i></p>
<#assign keys = map?keys>
<#list keys as key>
${key} = ${map[key]}
</#list>
<#if !map["keynotexist"]??>
<p><i>key not found</i></p>
<#else>
<p><i>key found</i></p>
</#if>If you want a sequence, just build the String. For example "[value1,value2,…]" and then call "eval" like above.And then do traverse like in the freemarker doc reference : http://www.freemarker.org/docs/ref_builtins_hash.htmlPS : according to the freemarker doc reference order may be maintained in the map. So I'am quite suspicious that behind this is a real java map…So it means that Map and Sequence in Freemarker looks to be the same java underlying data structure : a List, because they maintained the order both.Hoping it might help someone (this hints in missing in the wiki)