Function jsonb_path_exists4

Source
fn jsonb_path_exists4(
    target: JsonbRef<'_>,
    vars: JsonbRef<'_>,
    silent: bool,
    path: &JsonPath,
) -> Result<Option<bool>>
Expand description

Checks whether the JSON path returns any item for the specified JSON value. If the vars argument is specified, it must be a JSON object, and its fields provide named values to be substituted into the jsonpath expression. If the silent argument is specified and is true, the function suppresses the same errors as the @? and @@ operators do.

ยงExamples

query B
select jsonb_path_exists('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min && @ <= $max)', '{"min":2, "max":4}');
----
t