Given a data object and a path, return the corresponding value
@param  object data A data object
@param  string path A value path with dot notation
@return mixed  Return the value found at path or undefined if value doesn't exists
176328
function getValueAt(dataObject, path)
    {
        if (_.isUndefined(dataObject)) {
            return undefined;
        }
        if (!_.isString(path)) {
            return dataObject;
        }

        var tokens   = path.split('.');
        var property = tokens[0];
        var subpath  = tokens.slice(1).join('.');
        var data     = dataObject[property];

        if (tokens.length > 1 && !_.isUndefined(data))
        {
            return getValueAt(data, subpath);
        } else {
            return data;
        }
    }
367101
function seekSingle(data, pathStr, result, key) {
    if(pathStr.indexOf('$') < 0){
      result[key] = pathStr;
    }else{
      var seek = jsonPath.eval(data, pathStr) || [];

      result[key] = seek.length ? seek[0] : undefined;
    }
  }
610709
function (path, data) {
        var i = 0,
            len = path.length;
        for (;i<len;i++) {
            if (isObject(data) && (path[i] in data)) {
                data = data[path[i]];
            } else {
                data = undefined;
                break;
            }
        }
        return data;
    }
1267430
function get(path) {
    var conf = this;

    if (typeof path !== 'string') {
        throw new Error('path should be a string!');
    } else if (path.length === 0) {
        throw new Error('path cannot be empty!');
    }

    var result = baseGet(conf, getPathArray(path));
    if (result === undefined) {
        throw new Error('the value is undefined!');
    } else {
        bindGetMethod(result);  // eslint-disable-line
    }

    return result;
}
523480
private function getObjectRecursive($path)
    {
        $tree = $object = $this;
        foreach ($this->splitPath($path) as $part) {
            $object = $tree->getObject($part);
            if (!$object instanceof Tree) {
                return $object;
            }
            $tree = $object;
        }

        return $object;
    }
510589
public static function get(array $data, string $key, $defaultValue = null)
    {
        $data = self::dataByPath($data, $key);
        if ($data === null) {
            $data = $defaultValue;
        }
        return $data;
    }
478317
public static function getValueByKey($data, $key = null, $default = null)
    {
        if (!isset($key) || empty($key)) {
            return $data;
        }

        if (is_array($key)) {
            $keys = $key;
        } else {
            $keys = explode('.', $key);
        }

        $item = $data;
        foreach ($keys as $keyName) {
            if (is_array($item)) {
                if (isset($item[$keyName])) {
                    $item = $item[$keyName];
                } else {
                    return $default;
                }
            } else if (is_object($item)) {
                if (isset($item->$keyName)) {
                    $item = $item->$keyName;
                } else {
                    return $default;
                }
            }

        }

        return $item;
    }
782036
private function getData(string $path)
    {
        if (empty($this->configurations)) {
            return null;
        }

        return $this->configurations[$path] ?? null;
    }
418119
public function get($path, $default = null)
	{
		// Return default value if path is empty
		if (empty($path))
		{
			return $default;
		}

		if (strpos($path, $this->separator))
		{
			return parent::get($path, $default);
		}

		$nodes = get_object_vars($this->data);
		$found = false;

		// Traverse the registry to find the correct node for the result.
		foreach ($nodes as $n => $node)
		{
			if (is_array($node) && isset($node[$path]))
			{
				$value = $node[$path];
				$found = true;
				continue;
			}

			if (!isset($node->$path))
			{
				continue;
			}

			$value = $node->$path;
			$found = true;
		}

		if (!$found || $value === null || $value === '')
		{
			//return $default;
			return parent::get($path, $default);
		}

		return $value;
	}
649332
protected function readString($data, $path)
    {
        $path = (string)$path;

        if (!$path) {
            return null;
        }

        if ($path[0] != '@') {
            return $path; // static string
        }

        $path = substr($path, 1);

        // Use the property accessor so extract the value from the data. If the path does not exist in the
        // data then don't return a error but just null.

        try {
            return $this->convert($this->accessor->getValue($data, (string)$path));
        } catch (ExceptionInterface $e) {
            return null;
        }
    }
914449
public static function path(array $data, $path, $default = null)
    {
        $path = (array) $path;

        foreach ($path as $key) {
            if (!is_array($data) || !array_key_exists($key, $data)) {
                return $default;
            }
            $data = $data[$key];
        }

        return $data;
    }
778641
function getPath (obj, ks) {
      if (typeof ks == "string") ks = ks.split(".");

      // If we have reached an undefined property
      // then stop executing and return undefined
      if (obj === undefined) return void 0;

      // If the path array has no more elements, we've reached
      // the intended property and return its value
      if (ks.length === 0) return obj;

      // If we still have elements in the path array and the current
      // value is null, stop executing and return undefined
      if (obj === null) return void 0;

      return getPath(obj[_.first(ks)], _.rest(ks));
    }
257867
function getSubData( data, subPath ) {
  log( "getSubData",  'start ' );
  log( "getSubData",  JSON.stringify(data) );
  var result = data;
  if ( subPath == null ) {
    log( "getSubData",  'no subPath' );
  } else {
    log( "getSubData",  'tbl.dataDocSubPath='+subPath );
    var pathToken = subPath.split('.');
    log( "getSubData",  'pathToken[0] ' + pathToken[0] );
    var subdata = data[ pathToken[0] ];
    log( "getSubData", ">>"+JSON.stringify(subdata) );
    for ( var i = 1; i < pathToken.length; i++ ) {
      log( "getSubData", 'pathToken['+i+'] ' + pathToken[i] );
      if ( subdata != null ) {
        subdata = subdata[ pathToken[i] ];
        log( "getSubData", ">>"+JSON.stringify(subdata) );        
      } else {
        log( "getSubData", ">> NULL" );        
      }
    }
    result = subdata;
  }
  return result;
}
380936
protected function _getPathObject($path)
    {
        // return as-is if parameter is
        if (is_a($path, 'stdClass')) {
            return $path;
        }

        // create path object from given string
        $obj = new stdClass();
        $obj->dotted = $path;

        $parts = explode('.', $path);

        if (count($parts) === 1) {
            $obj->toKey = null;
            $obj->key = $path;

            return $obj;
        }

        $key = end($parts);
        array_pop($parts);
        $obj->toKey = implode('.', $parts);
        $obj->key = $key;

        return $obj;
    }
624018
function _get(obj, path) {
  var subpathes = path.split('.');
  while (subpathes.length) {
    var subpath = subpathes.shift();
    obj = obj[subpath];
    if (!obj) {
      return obj;
    }
  }
  return obj;
}
153885
function getValueByPath(o, path) {
        for (var i = 0, len = path.length; o !== undefined && i < len; i++) {
            o = o[path[i]];
        }
        return o;
    }
502324
@Override
    @Path("/{dataType}")
    public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
        String dataType = getSegment(path, 1);
        if (dataType == null)
            throw new ServiceException("Missing path segment: {dataType}");
        try {
            BaselineData baselineData = DataAccess.getBaselineData();
            if (dataType.equals("VariableTypes")) {
                List<VariableType> variableTypes = baselineData.getVariableTypes();
                JSONArray jsonArray = new JSONArray();
                for (VariableType variableType : variableTypes)
                    jsonArray.put(variableType.getJson());
                return new JsonArray(jsonArray).getJson();
            }
            else if (dataType.equals("TaskCategories")) {
                List<TaskCategory> taskCats = new ArrayList<TaskCategory>();
                taskCats.addAll(baselineData.getTaskCategories().values());
                Collections.sort(taskCats);
                JSONArray jsonArray = new JSONArray();
                for (TaskCategory taskCat : taskCats)
                    jsonArray.put(taskCat.getJson());
                return new JsonArray(jsonArray).getJson();
            }
            else {
                throw new ServiceException("Unsupported dataType: " + dataType);
            }
        }
        catch (Exception ex) {
            throw new ServiceException(ex.getMessage(), ex);
        }
    }