dot-object
dot-object copied to clipboard
Converted array turns into object
Was hoping I'd get back what I started with...
var a = [{'id':'xxx'}]; console.log(dot.object(dot.dot(a)));
Object { 0: Object { id: 'xxx' } }
I understand when dot.object() is called it knows nothing about the argument passed to dot.dot() and assuming properties are actually array indices just because they're ints might be problematic. But, if they're all ints and contiguous maybe it'd be a safe assumption?
https://codepen.io/ecarey/pen/owJLJO
Kudos on the library by the way. I appreciate your work.