I have two JSON arrays say,
A:
[ {"id": 123, "name": "AnyName1", "type": "AnyType"},
{"id": 231, "name": "AnyName2", "type": "AnyType"} ]
B:
[ {"id": 569, "thing": "AnyThing3"},
{"id": 891, "thing": "AnyThing4"} ]
I want to merge these two arrays (irrespective of ids) in 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"} ]
I want to achieve this without using a loop. Can someone help me with any shortcut way to do this in Typescript?