Skip to content

Commit 7e49ae5

Browse files
committed
fix links
1 parent de79914 commit 7e49ae5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/current/v25.2/jsonpath.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ A JSONPath expression has the following generic structure:
1818
- `mode` is an optional mode (`lax` or `strict`) that determines how structural mismatches are tolerated. If not specified, the mode is `lax`. Refer to [Structural error handling](#structural-error-handling).
1919
- `$` is the root of the JSONPath, and must be the first element in a JSONPath expression. For an example, refer to [Access entire document](#access-entire-document).
2020
- `.key` is an optional key accessor that refers to a named field in a `JSONB` object. To access array elements, use `.key[index]` or `.key[*]`. Each successive key accessor navigates one level deeper into the structure. `.*` matches all fields in the current object.
21-
- `? (filter_exp)` is an optional filter expression that evaluates the path according to a [predicate check expression](#check-expression), only returning the results that match. For syntax details, refer to [Filter expressions](#filter-expressions).
21+
- `? (filter_exp)` is an optional filter expression that evaluates the path according to a [predicate check expression](#check-expressions), only returning the results that match. For syntax details, refer to [Filter expressions](#filter-expressions).
2222
- `method` is an optional [JSONPath method](#jsonpath-methods) that can be used to access or transform the current path value.
2323

2424
The path is evaluated left to right, and each stage refines or filters the result.
@@ -27,13 +27,13 @@ The path is evaluated left to right, and each stage refines or filters the resul
2727

2828
Use JSONPath functions to extract or evaluate target `JSONB` data according to a specified [path](#jsonpath-expression). For full details on JSONPath functions, refer to [Functions and Operators]({% link {{ page.version.version }}/functions-and-operators.md %}# jsonpath-functions).
2929

30-
| Function | Description | If no match |
31-
|-------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
32-
| `jsonb_path_exists(jsonb, jsonpath)` | Returns true if any match is found. | `false` |
33-
| `jsonb_path_match(jsonb, jsonpath)` | Returns true if the path expression evaluates to true. Only useful with [predicate check expressions](#predicate-check-expressions), as it expects a single Boolean value. | `false` |
34-
| `jsonb_path_query(jsonb, jsonpath)` | Returns all matches as a set of `JSONB` values. | `NULL` |
35-
| `jsonb_path_query_array(jsonb, jsonpath)` | Returns all matches as a single `JSONB` array. | `[]` |
36-
| `jsonb_path_query_first(jsonb, jsonpath)` | Returns the first match only. | `NULL` |
30+
| Function | Description | If no match |
31+
|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
32+
| `jsonb_path_exists(jsonb, jsonpath)` | Returns true if any match is found. | `false` |
33+
| `jsonb_path_match(jsonb, jsonpath)` | Returns true if the path expression evaluates to true. Only useful with [predicate check expressions](#check-expressions), as it expects a single Boolean value. | `false` |
34+
| `jsonb_path_query(jsonb, jsonpath)` | Returns all matches as a set of `JSONB` values. | `NULL` |
35+
| `jsonb_path_query_array(jsonb, jsonpath)` | Returns all matches as a single `JSONB` array. | `[]` |
36+
| `jsonb_path_query_first(jsonb, jsonpath)` | Returns the first match only. | `NULL` |
3737

3838
Each function accepts two required and two optional arguments as follows:
3939

@@ -155,7 +155,7 @@ SELECT jsonb_path_query(data, '$.season') FROM stats;
155155
"2023-24"
156156
~~~
157157

158-
To access nested keys, append key accessors to their parent keys. The following query returns the `stats` value for each element in the `players` array, using the [array accessor](#access-array-elements):
158+
To access nested keys, append key accessors to their parent keys. The following query returns the `stats` value for each element in the `players` array, using the [array accessor](#access-jsonb-array-elements):
159159

160160
{% include_cached copy-clipboard.html %}
161161
~~~ sql
@@ -419,7 +419,7 @@ SELECT jsonb_path_query(data, '$.players[*] ? (@.team like_regex "^L.*")') FROM
419419

420420
## Variables in JSONPath expressions
421421

422-
Define a variable in a JSONPath expression by prefixing it with `$`. Then specify a value as an argument in the [JSONPath function](#jsonpath-function).
422+
Define a variable in a JSONPath expression by prefixing it with `$`. Then specify a value as an argument in the [JSONPath function](#jsonpath-functions).
423423

424424
The following query filters players whose `ppg` is greater than the value of the `min` variable:
425425

@@ -518,7 +518,7 @@ ERROR: jsonpath member accessor can only be applied to an object
518518
SQLSTATE: 2203A
519519
~~~
520520

521-
However, setting `silent` to `true` in a [JSONPath function](#jsonpath-function) suppresses any errors:
521+
However, setting `silent` to `true` in a [JSONPath function](#jsonpath-functions) suppresses any errors:
522522

523523
{% include_cached copy-clipboard.html %}
524524
~~~ sql

0 commit comments

Comments
 (0)