Retrieves the value of an Object foreign property using a dot-separated
path string.

Beware, this function doesn't handle object key names containing a dot.

@param  Object  obj   The source object
@param  String  path  Dot separated path, eg. "x.y.z"
488588
function getPropertyPath(obj, path) {
    "use strict";
    if (!isObject(obj) || !isString(path)) {
        return undefined;
    }
    var value = obj;
    path.split('.').forEach(function(property) {
        if (typeof value === "object" && property in value) {
            value = value[property];
        } else {
            value = undefined;
        }
    });
    return value;
}
827496
function objGetObj(obj, _key) {
  var key = Array.isArray(_key) ? _key : String(_key).split('.');
  var p, n, ok=1;
  var ret = {ok:ok, path:key, obj:obj};
  for(p=0; p<key.length; p++) {
    n = key[p];
    if(!obj.hasOwnProperty(n) || isPrimitive(obj[n])) {
      ok = 0;
      break
    }
    obj = obj[n];
  }
  ret.ok= ok;
  ret.path = key.slice(0,p);
  ret.obj=obj;
  return ret
}
509623
def getattr_path(obj, path):
    
    path = path.split('__')
    for name in path:
        obj = getattr(obj, name)
        if obj is None:
            return None
    return obj
857242
function getPath( object , path ) {
	var i = 0 , iMax = path.length , p = object ;

	//console.log( "getPath():" , object , path ) ;

	try {
		for ( ; i < iMax ; i ++ ) {
			//console.log( "Next path:" , path[ i ] ) ;
			p = p[ path[ i ] ] ;
		}
	}
	catch ( error ) {
		throw new Error( "Bad ref: path not found" ) ;
	}

	return p ;
}
570194
function getPropertyValue(node, path) {
  const parts = typeof path === 'string' ? path.split('.') : path;

  if (parts.length === 1) {
    return node[path];
  }

  const property = node[parts[0]];

  if (property && parts.length > 1) {
    parts.shift();
    return getPropertyValue(property, parts);
  }

  return property;
}
622062
function setPath(obj, path, value) {
	var cur = obj;
	var parts = path.split('.');
	var i;
	for (i = 0; i < parts.length; i++) {
		if (i === parts.length - 1) {
			cur[parts[i]] = value;
		} else {
			if (isScalar(cur[parts[i]])) cur[parts[i]] = {};
			cur = cur[parts[i]];
		}
	}
	return obj;
}
239825
@Override
  public Object get(Object obj) {
    String key = this.keyOf(obj);
    return this.getByKey(key);
  }
317318
function getValue(item, keyOrPath) {
  const keys = keyOrPath.split('.');
  const used = [];
  while (keys.length > 0) {
    const key = keys.shift();
    used.push(key);
    if (!isValid(item[key])) {
      throw new Error(`path ${used.join('.')} is not an object`);
    }
    item = item[key];
  }
  return item[keys[0]];
}
996964
function getPropertyOfPath(obj, path) {
    const [child, last] = getLeafOfPath(obj, path, false);
    return child && last ? child[last] : undefined;
}
992254
function _get(obj, keypath) {
    var parts = _keyPathNormalize(keypath).split('.')
    var dest = obj
    parts.forEach(function(key) {
        if (isNon(dest)) return !(dest = undf())
        dest = dest[key]
    })
    return dest
}
276112
function getProp(obj, key) {
    var path = [].concat(key);
    var val = obj;
    for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {
        var pathKey = path_1[_i];
        if (val[pathKey] === undefined) {
            return undefined;
        }
        val = val[pathKey];
    }
    return val;
}
475731
function getAppend(path, obj, target, propName){
  var propValue = utils.getNodeVaue(path, obj);
  if(propValue)
    target[propName] = propValue;
}
714268
function(path, obj) {
    if(path == '#') return obj;
    path = path.substr(1);
    var parts = path.split('/');
    parts.shift();

    // Locate object
    for(var i = 0; i < parts.length; i++) {
      obj = obj[parts[i]];
    }

    return obj;
  }
798072
function setPropertyOfPath(obj, path, value) {
    const [child, last] = getLeafOfPath(obj, path);
    if (child && last) {
        child[last] = value;
    }
}
364584
function getItemList(object, path){

      for (var prop in object){

        if(typeof object[prop] === 'object'){
          var newPath = path + (prop+'/');
          getItemList(object[prop], newPath);
        }else{
          var item = {
            path      : path+prop,
            repo      : object[prop]
          };
          repoList.push(item);
        }

      }

    }
1267532
private function parsePath($object, $path)
    {
        $pos = mb_strpos($path, '.');
        $name = mb_substr($path, 0, $pos);
        $rest = mb_substr($path, $pos + 1);
        $sub_object = $object->$name;

        if ($sub_object === null) {
            return null;
        } elseif (mb_strpos($rest, '.') === false) {
            return $sub_object->$rest;
        } else {
            return $this->parsePath($sub_object, $rest);
        }
    }
202634
function getValue(object) {
  for (var i = 1; i < arguments.length && isValue(object); ++i) {
    var propertyName = arguments[i];
    assert(typeof propertyName === 'string');
    object = object[propertyName];
  }
  return object;
}