Consider two JSON arrays:
A:
[ {"id": 123, "name": "AnyName1", "type": "AnyType"},
{"id": 231, "name": "AnyName2", "type": "AnyType"} ]
B:
[ {"id": 569, "thing": "AnyThing3"},
{"id": 891, "thing": "AnyThing4"} ]
The goal is to merge these two arrays regardless of ids into a common JSON array:
C=A+B:
[ {"id": 123, "name": "AnyName1", "type": "AnyType"},
{"id": 231, "name": "AnyName2", "type": "AnyType"},
{"id": 569, "thing": "AnyThing3"},
{"id": 891, "thing": "AnyThing4"} ]
Is there a way to achieve this without the use of loops in Typescript? Seeking assistance on a shortcut method.