Sorting a Map by value with Groovy is very simple, due to the added ‘sort’ method on the Map interface. [groovy language=”language="true”] def map = [a:3, b:2, c:1] map = map.sort {it.value} assert map == [c:1, b:2, a:3] [/groovy] Turns out doing a reverse sort on a Map by values is almost as easy. [groovy […]