src/JsonQueriable.php
protected function getFromNested($map, $node)
    {
        if (empty($node) || $node == '.') {
            return $map;
        }

        if ($node) {
            $terminate = false;
            $path = explode('.', $node);

            foreach ($path as $val) {
                if (!array_key_exists($val, $map)) {
                    $terminate = true;
                    break;
                }

                $map = &$map[$val];
            }

            if ($terminate) {
                return new ValueNotFound();
            }

            return $map;
        }

        return new ValueNotFound();
    }
protected function getFromNested($map, $node)
    {
        if (empty($node) || $node == '.') {
            return $map;
        }

        if ($node) {
            $terminate = false;
            $path = explode('.', $node);

            foreach ($path as $val) {
                if (!array_key_exists($val, $map)) {
                    $terminate = true;
                    break;
                }

                $map = &$map[$val];
            }

            if ($terminate) {
                return new ValueNotFound();
            }

            return $map;
        }

        return new ValueNotFound();
    }
protected function getFromNested ( $ map , $ node ) { if ( empty ( $ node ) || $ node == '.' ) { return $ map ; } if ( $ node ) { $ terminate = false ; $ path = explode ( '.' , $ node ) ; foreach ( $ path as $ val ) { if ( ! array_key_exists ( $ val , $ map ) ) { $ terminate = true ; break ; } $ map = & $ map [ $ val ] ; } if ( $ terminate ) { return new ValueNotFound ( ) ; } return $ map ; } return new ValueNotFound ( ) ; }
Get data from nested array

@param $map array
@param $node string
@return bool|array|mixed
Get data from nested array