obj.key1.key2.blablbabla.abc = 3;
function checkNameSpace(parent,propString){
var parts = propString.split('.');
for(var i=0,len=parts.length;i<len;i++){
if(typeof parent[parts[i]] === 'undefined'){
parent[parts[i]] = {};
}
parent = parent[parts[i]];
}
return parent;
}
checkNameSpace(window,'localStorage.getItem');