Skip to content

Commit 06100e3

Browse files
committed
optimize doc
Signed-off-by: xinyual <xinyual@amazon.com>
1 parent 5cf3d9d commit 06100e3

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

docs/user/ppl/functions/json.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,26 @@ JSON Functions
1010

1111

1212

13-
JsonPath
14-
--------
13+
JSON Path
14+
---------
15+
16+
Description
17+
>>>>>>>>>>>
18+
19+
All JSON paths used in JSON functions follow the format `<key1>{<index1>}.<key2>{<index2>}...`.
1520

16-
All JSON paths used in JSON functions follow the format:
17-
``<key1>{<index1>}.<key2>{<index2>}...``
21+
Each `<key>` represents a field name. The `{<index>}` part is optional and is only applicable when the corresponding key refers to an array.
1822

19-
Each `<key>` represents a field name, and `{<index>}` is an optional array index that is **only applicable** when the corresponding key refers to an array.
23+
For example::
2024

21-
For example:
22-
`a{2}.b{0}` refers to the element at index `0` of the `b` array, which is nested inside the element at index `2` of the `a` array.
25+
a{2}.b{0}
2326

24-
The `{<index>}` notation:
25-
- Applies **only** when the associated key points to an array.
26-
- If used as `{}`, it is interpreted as a **wildcard**, equivalent to `{*}`, meaning all elements in the array at that level.
27+
This refers to the element at index 0 of the `b` array, which is nested inside the element at index 2 of the `a` array.
2728

28-
This syntax enables precise or broad selection of nested data structures within JSON documents.
29+
Notes:
2930

31+
- The `{<index>}` notation applies **only when** the associated key points to an array.
32+
- `{}` (without a specific index) is interpreted as a **wildcard**, equivalent to `{*}`, meaning "all elements" in the array at that level.
3033

3134

3235
JSON Path

0 commit comments

Comments
 (0)