I have a Map<Key1, Map<Key2, CustomObject>>. I need go through the Map, check if Key2.equals("a string") and return a Map<Key1, CustomObject>.
Is this possible with java 8? Should it be done with java 8 or is it better with nested for loops?