src/Peekmo/JsonPath/JsonPath.php
private function asPath($path)
    {
        $expr = explode(";", $path);
        $fullPath = "$";
        for ($i = 1, $n = count($expr); $i < $n; $i++) {
            $fullPath .= preg_match("/^[0-9*]+$/", $expr[$i]) ? ("[" . $expr[$i] . "]") : ("['" . $expr[$i] . "']");
        }

        return $fullPath;
    }
private function asPath($path)
    {
        $expr = explode(";", $path);
        $fullPath = "$";
        for ($i = 1, $n = count($expr); $i < $n; $i++) {
            $fullPath .= preg_match("/^[0-9*]+$/", $expr[$i]) ? ("[" . $expr[$i] . "]") : ("['" . $expr[$i] . "']");
        }

        return $fullPath;
    }
private function asPath ( $ path ) { $ expr = explode ( ";" , $ path ) ; $ fullPath = "$" ; for ( $ i = 1 , $ n = count ( $ expr ) ; $ i < $ n ; $ i ++ ) { $ fullPath .= preg_match ( "/^[0-9*]+$/" , $ expr [ $ i ] ) ? ( "[" . $ expr [ $ i ] . "]" ) : ( "['" . $ expr [ $ i ] . "']" ) ; } return $ fullPath ; }
Builds json path expression
@param string $path
@return string
Builds json path expression