fn jsonb_path_query_first4(
target: JsonbRef<'_>,
vars: JsonbRef<'_>,
silent: bool,
path: &JsonPath,
) -> Result<Option<JsonbVal>>
Expand description
Returns the first JSON item returned by the JSON path for the specified JSON value.
Returns NULL if there are no results.
The optional vars and silent arguments act the same as for jsonb_path_exists
.
ยงExamples
query T
select jsonb_path_query_first('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min && @ <= $max)', '{"min":2, "max":4}');
----
2