public static function recursive_get($obj, $path)
    {    
        foreach (explode('|', $path) as $key) {
            if (is_object($obj)) {
                if (isset($obj->$key)) {
                    $obj = $obj->$key;
                } else {
                    return null;
                }
            } elseif (isset($obj[$key])) {
                $obj = $obj[$key];
            } else {
                return null;
            }
        }
        return $obj;
    }