code: function to(obj, func, map) {
      if(!obj || typeof obj !== "object") return obj;
  
      if(obj instanceof Date) return obj;
  
      if(Array.isArray(obj)) {
          var res = [];
          for(var i = 0; i < obj.length; i++) {
              res.push(to(obj[i], func, map));
          }
          return res;
      }
  
      var res = {};
      for(var key in obj) {
          if(!obj.hasOwnProperty(key)) continue;
  
          /**
           * Rules:
           *
           * 1. $...: keep origin;
           * 2. otherwise;
           *   2.1. map[key] exists: map[key];
           *   2.2. otherwise: func(key).
           */
          const newKey = (key[0] === "$" ? key : (map[key] || func(key)))
          res[newKey] = to(obj[key], func, map);
      }
      return res;
  }
docs: to
  @param {*} obj the object to be transformed
  @param {Function} func the key transformation function
  @param {Object} [map] the specified key transformation map
  @returns {*} the new object