code: function merge(dest, src) {
          if (dest instanceof Object && src instanceof Object) {
              Object.keys(src).forEach(function (key) {
                  if (!dest[key] || !(dest[key] instanceof Object && src[key] instanceof Object)) {
                      dest[key] = src[key];
                  } else { // both objects, so merge
                      merge(dest[key], src[key]);
                  }
              });
          }
          return dest;
      }
docs: Does a merge of the properties of src into dest. Dest is modified and returned (though the return value can be safely ignored). If src and dest are not both objects, then dest is not modified.  Important: This is *not* a deep copy and should not be treated as such. Sub-objects of src may get added to dest by reference. So, changing sub-properties of src after calling merge may change dest.