This works correctly:
var deep_value = function(obj, path){
for (var i=0, path=path.split('.'), len=path.length; i<len; i++){
obj = obj[path[i]];
};
return obj;
};
Here is the proof / demo: jsfiddle.net/tadeck/5Pt2q/13/
EDIT: I have removed redundant variables, shortened the code.