Closed mattbishop closed 1 year ago
The spec allows for variables to be declared in a path statement, then populated in the functions. It is called the PASSING statement.
$.name ? (@ starts with $letter)
$letter is a variable in this statement.
$letter
The API should accept an optional variables object:
const sqlJsonPath = parse('$.name ? (@ starts with $letter)') sqlJsonPath.exists({letter: 'm'})
Because of this feature, SQL JSONPath explicitly disallows JSON object keys starting with "$" characters. I wonder if they need to be addressed in array notation like $.person["$ref"]
$.person["$ref"]
Resolved in #20
The spec allows for variables to be declared in a path statement, then populated in the functions. It is called the PASSING statement.
$.name ? (@ starts with $letter)
$letter
is a variable in this statement.The API should accept an optional variables object:
Because of this feature, SQL JSONPath explicitly disallows JSON object keys starting with "$" characters. I wonder if they need to be addressed in array notation like
$.person["$ref"]