Skip to content
Advertisement

JS merge Array of the Maps to a single Map

I have a structure of

JavaScript

All keys are different there. I am trying find the common way to merge it in one Map.

I know the way for two Maps:

JavaScript

But for this solution I need more common way.

Advertisement

Answer

You are looking for flatMap:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement