I have an object.
var o = {a : {b : 1}};
In order to access the value of o.a.b
via string 'a.b'
, I will normally think about this.
var ab = 'a.b'.split('.');
console.log(o[ab[0]][ab[1]]);
Is there a more elegant way of doing the same stuff?