JSFiddle - React, Tailwind, and code Playground

HTML

<div id="log"> </div>

JavaScript

var a = {
    nested: {
        arr: [0, 1, 2],
        str: "abc"
    }
};

var b = {
    nested: {
        arr: [3],
        str: "d"
    }
};

Object.append(a, b);
$("log").set("html",
    "nested.arr = [" + a.nested.arr.toString() + "]" +
    " (should be [3]) <br/>" +
    "nested.str = '" + a.nested.str + "'" +
    " (should be 'd')"
)