jsonb_path_query_first ( target jsonb, path jsonpath [, vars jsonb [, silent boolean ]] ) → jsonbReturns 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