Closed aldo-sanchez closed 1 year ago
use an array path when you expect no conversions. by convention, when there's a number in a string path, it always mean an array index. so in your example:
let emptyObj = {}
const path = ['a', '2008'] // string '2008' really means string, thus an object property
const value = [1,2,3,4]
objectPath.set(emptyObj, path, value)
I want to set an object as follows:
I expect the object to look like:
Instead the object looks like this: