3 ms·
You can also handle problems like this via libraries. For example, underscore-contrib [1] does it this way: var x = _.getPath(a, "b.c.d"); There are defin
by joshuacc 12y ago
You can also handle problems like this via libraries. For example, underscore-contrib [1] does it this way:
var x = _.getPath(a, "b.c.d");
There are definitely advantages to having this pattern baked into the language, though.
[1] http://documentcloud.github.io/underscore-contrib/ http://documentcloud.github.io/underscore-contrib/