I have a function that returns an object like (key is string and value is array of strings):

```
{"myType1": ["123"]}

```

I want to merge all the results its returning for example - if I have:

```
{"myType1": ["123"]}

{"myType2": ["456"]}

{"myType1": ["789"]}

```

I'd like to get 

```
{"myType1": ["123", "789], "myType2": ["456"]}

```

[I've seen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) `Object.assign` however that doesn't merge the values it just replaces with the most recent.

Has anyone got an examples of how I can achieve this?

Any help appreciated.

Thanks.