code: function getLeafOfPath(obj, path, create_object = true) {
      const parts = Array.isArray(path) ? path.slice(0) : path.split('.');
      const last = parts.pop();
      if (parts.length > 0) {
          if (create_object !== false) {
              for (const part of parts) {
                  obj = obj[part] || (obj[part] = {});
              }
          }
          else {
              for (const part of parts) {
                  obj = obj[part];
                  if (!obj) {
                      return [undefined, undefined];
                  }
              }
          }
      }
      return [obj, last];
  }
docs: Returns leaf object and last part.
  
  e.g.) (obj, 'a.b.c') -> [ obj.a.b, 'c' ]
  @memberOf util
   tslint:disable-next-line:max-line-length