SyntaxFix
Write A Post
Hire A Developer
Questions
Joseph forgot to add the value in his example with withDefault. Here is the code I ended up using:
withDefault
Map map = [:].withDefault { key -> return [] } listOfObjects.each { map.get(it.myKey).add(it.myValue) }