get value with dot notation, e.g. get(obj, 'key.for.something')
504898
function get(obj, key) {
    var i, accessor = key.split('.'), empty = true;
    for (i=0; i<accessor.length; i++) {
      // empty string for key.that.does.not.exist
      if (!obj) return '';
      obj = obj[accessor[i]];
    }
    // empty string for every falsy value except 0
    if (obj === undefined || obj === null || obj === false) return '';
    // treat [] and {} as falsy also
    if (obj instanceof Array && obj.length == 0) return '';
    if (obj.constructor === Object) {
      for (i in obj) if (obj.hasOwnProperty(i)) empty = !i;
      if (empty) return '';
    }
    return obj;
  }
1114539
function get(key) {
  var k = this.getKey(key);
  var name = this.getName(key);
  var value = this.getValue(k, name, key);
  return value;
}
543299
function readObjectValue(object) {
	let result = ''

	if (typeof object === 'string' || object instanceof String) {
		result = object
	} else if (typeof object === 'number' || object instanceof Number) {
		result = object.toString()
	} else if (object) {
		Object.keys(object).forEach(key => {
			result += key + ': ' + object[key] + '\t'
		})
	}

	if (!result.length) {
		result = 'Not Specified'
	}

	return result.replace(new RegExp('"', 'g'), '""')
}
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]];
}
11154
protected function getValue($key)
    {
        if (isset($key[0]) && $key[0] === self::CONST_PREFIX) {
            // If string starts with "=" symbol
            // then cut it and return plain string.
            return substr($key, 1);
        }

        // Get value using a dot notation
        $data = $this->object;
        foreach (explode('.', $key) as $step) {
            if (is_array($data)) {
                $data = $data[$step];
            } else {
                $data = $data->$step;
            }
        }

        return (string)$data;
    }
821593
def get_id2lower(objs):
    """"""
    id2lower = {}
    for obj in objs:
        _get_id2lower(id2lower, obj.item_id, obj)
    return id2lower
688027
function get (obj, property, defaultValue) {
  if (isNull(obj) || isUndefined(obj)) {
    return defaultValue
  }
  var result = pathGet(obj, property)
  return isUndefined(result) ? defaultValue : result
}
1036141
def value(cls, obj, keystr):
        
        if "#{" in keystr:
            # it's a template with keys vars
            keys = cls.from_template(keystr)
            for k in keys:
                v = cls.fetch(obj, cls.extract(k))
                keystr = keystr.replace(k, str(v))

            value = keystr
        else:
            # plain keys str
            value = cls.fetch(obj, keystr)

        return value
633411
def _get_key(key, scopes):
    """"""

    # If the key is a dot
    if key == '.':
        # Then just return the current scope
        return scopes[0]

    # Loop through the scopes
    for scope in scopes:
        try:
            # For every dot seperated key
            for child in key.split('.'):
                # Move into the scope
                try:
                    # Try subscripting (Normal dictionaries)
                    scope = scope[child]
                except (TypeError, AttributeError):
                    try:
                        # Try the dictionary (Complex types)
                        scope = scope.__dict__[child]
                    except (TypeError, AttributeError):
                        # Try as a list
                        scope = scope[int(child)]

            # Return an empty string if falsy, with two exceptions
            # 0 should return 0, and False should return False
            # While using is for this check is undefined it works and is fast
            if scope is 0:  # noqa: F632
                return 0
            if scope is False:
                return False

            try:
                # This allows for custom falsy data types
                # https://github.com/noahmorrison/chevron/issues/35
                if scope._CHEVRON_return_scope_when_falsy:
                    return scope
            except AttributeError:
                return scope or ''
        except (AttributeError, KeyError, IndexError, ValueError):
            # We couldn't find the key in the current scope
            # We'll try again on the next pass
            pass

    # We couldn't find the key in any of the scopes
    return ''
845329
def _extract_key_value(obj):
    """"""
    key = None; value = None

    # Parse a Value object, which includes Properties
    if isinstance(obj, Value):
        key = _construct_new_key(obj.name, obj.units)
        value = []
        if obj.scalars:
            value = [(val.value if isinstance(val, Scalar) else val)
                     for val in obj.scalars]
        elif obj.vectors and len(obj.vectors) == 1:
            value = [(val.value if isinstance(val, Scalar) else val)
                     for val in obj.vectors[0]]
        if len(value) == 1:
            value = value[0]
        elif len(value) == 0:
            value = None

    # If there is a process step, pul out its name as the value
    # TODO: resolve duplicates
    if isinstance(obj, ProcessStep):
        key = "Processing"
        value = obj.name
        
    return key, value
897077
def _from_json_object_hook(obj):
    

    for key, value in obj.items():
        # Check for datetime objects
        if isinstance(value, str):
            dt_result = datetime_regex.match(value)
            if dt_result:
                year, month, day, hour, minute, second = map(
                    lambda x: int(x), dt_result.groups())
                obj[key] = datetime.datetime(
                    year, month, day, hour, minute, second)
            else:
                dt_result = uuid_regex.match(value)
                if dt_result:
                    obj[key] = uuid.UUID(value)
    return obj
587482
def get_dotted(self, key):
        
        parts = key.split('.')
        cobj = self
        for attr in parts:
            cobj = getattr(cobj, attr)
        return cobj
1090167
function ( obj, key, value ) {
		if ( value !== undefined ) {
			obj.setAttribute( "data-" + key, regex.json_wrap.test( value ) ? json.encode( value ) : value );
			return obj;
		}
		else {
			return utility.coerce( obj.getAttribute( "data-" + key ) );
		}
	}
990913
function getDataFromDotNotation (d, row) {
  return d.split('.').reduce((o, i) => { if (o === undefined) { return undefined } else { return o[i] } }, row)
}
1225756
function getkey (key) {
    var parsedKey = Number(key)

    return (
      isNaN(parsedKey) ||
      key.indexOf('.') !== -1 ||
      opts.object
    ) ? key
      : parsedKey
  }
243197
function stringDotToObj(result, prop, name, value) {
        if (!result[prop]) {
            result[prop] = {};
        }
        name = name.substring((prop + '.').length, name.length);
        result[prop][name] = value;
    }
304700
def _dotted_get(self, dotted_key, default=None, **kwargs):
        
        split_key = dotted_key.split(".")
        name, keys = split_key[0], split_key[1:]
        result = self.get(name, default=default, **kwargs)
        self._memoized = result

        # If we've reached the end, then return result and clear the
        # memoized data.
        if not keys or result is default:
            self._memoized = None
            return result

        # If we've still got key elements to traverse, let's do that.
        return self._dotted_get(".".join(keys), default=default, **kwargs)