I'm not sure if it is possible to achieve such thing through JavaScript so I'm asking for help here.
I have a string:
var value = 'level1.level2.level3';
And I have an object:
var object = {
level1 : {
level2 : {
level3 : 0
},
},
}
Is it possible to get a reference to that object using string value, not just value of specific object key. Using a traverse function but a reference so it could be possible to operate with it.
I've checked and I'm sure this is NOT a duplicate question since in a duplicate version result of parsing function will be object key value, not the object key itself.