I have a List<Map<String,Object>>
[ {key1: object1a, key2: object2a, key3: object3a},
{key1: object1a, key2: object2a, key3: object3a},
{key1: object1b, key2: object2b, key3: object3b},
{key1: object1b, key2: object2b, key3: object3b},
...
]
and I would like to group it by the third value, to obtain a Map<String,List<Map<String,Object>>>:
{ object3a: [ {key1: object1a, key2: object2a},
{key1: object1a, key2: object2a}
],
object3b: [ {key1: object1b, key2: object2b},
{key1: object1b, key2: object2b}
],
...
}
Is it possible by using the Collectors.groupingBy? method, and how ?
[...]and maps by{...}. . . but then I got to[sample1: a, sample2 : b], and I suddenly have no idea what notation you're using.