code: function merge(defaultConfig, additionalConfig) {	
  	for( var p in additionalConfig ) {
  		if( defaultConfig.hasOwnProperty(p)) {
  			if (typeof additionalConfig[p] === 'object' && !(util.isArray(additionalConfig[p]))) {
  				//this is an object, recurse
  				defaultConfig[p] = merge(defaultConfig[p], additionalConfig[p]);
  			} else {
  				//this is an array or otherwise simple property
  				defaultConfig[p] = additionalConfig[p];
  			}
  		}
  	};
  
  	return defaultConfig;
  }
docs: http://stackoverflow.com/questions/7997342/merge-json-objects-without-new-keys