code: function overwriteKeys(baseObject, overrideObject, createNew) {
    if (!baseObject) {
      baseObject = {};
    }
    if (createNew) {
      baseObject = JSON.parse(JSON.stringify(baseObject));
    }
    Object.keys(overrideObject).forEach(function(key) {
      if (isObjectAndNotArray(baseObject[key]) && isObjectAndNotArray(overrideObject[key])) {
        overwriteKeys(baseObject[key], overrideObject[key]);
      }
      else {
        baseObject[key] = overrideObject[key];
      }
    });
    return baseObject;
  }
docs: 'createNew' defaults to false