Loading homepage
Write a value at a nested path, creating missing object or array containers along the way.
Input: const object = {}; deepSet(object, "users.0.name", "Ada"); object Output: { users: [{ name: "Ada" }] }
Input: const object = { a: null }; deepSet(object, ["a", "b"], 3); object Output: { a: { b: 3 } }
Implement the exported function in index.js or index.ts. See requirements for edge cases.