src/mako/database/query/compilers/traits/JsonPathBuilderTrait.php
protected function buildJsonPath(array $segments): string
	{
		$path = '';

		foreach($segments as $segment)
		{
			if(is_numeric($segment))
			{
				$path .= '[' . $segment . ']';
			}
			else
			{
				$path .= '.' . '"' . str_replace(['"', "'"], ['\\\"', "''"], $segment) . '"';
			}
		}

		return '$' . $path;
	}
protected function buildJsonPath(array $segments): string
	{
		$path = '';

		foreach($segments as $segment)
		{
			if(is_numeric($segment))
			{
				$path .= '[' . $segment . ']';
			}
			else
			{
				$path .= '.' . '"' . str_replace(['"', "'"], ['\\\"', "''"], $segment) . '"';
			}
		}

		return '$' . $path;
	}
protected function buildJsonPath ( array $ segments ) : string { $ path = '' ; foreach ( $ segments as $ segment ) { if ( is_numeric ( $ segment ) ) { $ path .= '[' . $ segment . ']' ; } else { $ path .= '.' . '"' . str_replace ( [ '"' , "'" ] , [ '\\\"' , "''" ] , $ segment ) . '"' ; } } return '$' . $ path ; }
Builds a JSON path.

@param  array  $segments Path segments
@return string
Builds a JSON path .