hash concatenation messes key ordering
John Cherouvim <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Hello
This FreeMarker template:
<#local foo={'a':'1','b':'2'} />
<#local foo=foo+{'c':'3'} />
<#list foo?keys as k>
${k}
</#list>
prints:
b c a
Would it be possible to concatenate 2 hashes in FreeMarker but retain
the key ordering? (so it would print "a b c")
What I'm asking already happens in sequence concatenation, so:
<#local foo=['a','b'] />
<#local foo=foo+['c'] />
<#list foo as k>
${k}
</#list>
prints:
a b c
I'm using FreeMarker ver 2.3.15
thanks a lot!
Ioannis
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects