Let's say I have an array with unknown number of values. For example: ['one', 'two', 'three'].
How can I construct a square bracket notation for an object from it? Basically, I need to create this: var result = myObject['one']['two']['three'].
They key here is to understand that there can be any number of values in the array and I just need to go n-levels deep into the object using these values.