I have the following object:
var inv = {roles: {"xxx00": {roleId: "zzzz33"}}, assign: [1, 2, 3] }
This is the result:
{ roles: { "1234": {roleId: null}, "5678": {roleId: null}}}
I need to consolidate the object with this result:
{roles: {"1234": {roleId: null}, "5678": {roleId: null}, "xxx00": {roleId: "zzzz33"}}, assign: [1, 2, 3] }
And I need to get that with the spread syntax
Any idea how the syntax should be to get this result without losing the original roleId?