Returns the first JSON item returned by the JSON path for the specified JSON value, or NULL if there are no results.
9.0 9.1 9.2 9.3 9.4 9.5 9.6 10 11 12 13 14 15 16 17 18 19 beta 3 20 devel
Signatures & examples jsonb_path_query_first ( target jsonb, path jsonpath [, vars jsonb [, silent boolean ]] ) → jsonb Returns the first JSON item returned by the JSON path for the specified JSON value, or NULL if there are no results. The parameters are the same as for jsonb_path_query.jsonb_path_query_first('{"a":[1,2,3,4,5]}', '$.a[*] ? (@ >= $min && @ <= $max)', '{"min":2, "max":4}') → 2
Version history 3 PG 16 → 17 changed PG 12 → 13 changed PG 11 → 12 added
Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source