This is really hacky, but this should work. I suggest doing as the other users have suggested in the comments; find a pre-existing library that will do this for you.
for(var key in user1){
var temp = User[key]
User[key] = user1[key];
for(var key1 in temp){
if(User[key][key1] == null){
User[key][key1] = temp[key1];
}
}
}