I have two json object in which one is nested. For example:
data1 : [{"name": "abc", "age": 26, "title": "xyz", "address": {"street":"yyy","city":"ttt","country":"kkk"}]
date2: [{"color": "blue", "sqad": "jkl", "priority": "rst", "division": "opq", "range": 456}]
I tried to merge them using spread operator and also object.assign but not getting the expected result.
I need it combined like below:
[{"name": "abc", "age": 26, "title": "xyz", "color": "blue", "sqad": "jkl", "priority": "rst", "division": "opq", "range": 456 }]
Try this. This uses spread operator