2018-11-10 20:31
这个你得有办法获取最外层的 hash 对象,最好是取个名为好,例如:
{root : {
"list_index":["a","b","c",...,"z"],
"a":[{},{},...{}],
"b":[{},{},...{}],
...
"z":[{},{},...{}]
}
}
然后可以这么来玩:
#set(keyList = [ ])
#for ( key : list_index)
#(keyList.add(key), null)
#end
#for ( key : keyList)
#for (x : root.get(key))
#(x.name)
#end
#end