@@ -28,6 +28,8 @@ Atomic expressions:
28
28
Syntax | Meaning
29
29
------------------------------|-------------------
30
30
` $ ` | The root object
31
+ `` `this` `` | The "current" object.
32
+ `` `foo` `` | More generally, this syntax allows "named operators" to extend JSONPath is arbitrary ways
31
33
_ field_ | Specified field(s), described below
32
34
` [ ` _ field_ ` ] ` | Same as _ field_
33
35
` [ ` _ idx_ ` ] ` | Array access, described below (this is always unambiguous with field access)
@@ -58,9 +60,9 @@ Array specifiers ( _idx_ ):
58
60
59
61
Syntax | Meaning
60
62
---------------------------------------|----------------------------------------
61
- - ` [ ` _ n_ ` ] ` | array index (may be comma-separated list)
62
- - ` [ ` _ start_ ` ?: ` _ end_ ` ?] ` | array slicing (note that _ step_ is unimplemented only due to lack of need thus far)
63
- - ` [*] ` | any array index
63
+ ` [ ` _ n_ ` ] ` | array index (may be comma-separated list)
64
+ ` [ ` _ start_ ` ?: ` _ end_ ` ?] ` | array slicing (note that _ step_ is unimplemented only due to lack of need thus far)
65
+ ` [*] ` | any array index
64
66
65
67
66
68
Programmatic JSONPath
@@ -89,6 +91,9 @@ Extensions
89
91
None, then for any piece of data missing that field, it will be replaced by
90
92
the JSONPath to it, giving automatic unique ids to any piece of data. These ids will
91
93
take into account any ids already present as well.
94
+ - _ Named operators_ : Instead of using ` @ ` to reference the currently object, this library
95
+ uses `` `this` `` . In general, any string contained in backquotes can be made to be
96
+ a new operator, currently by extending the library.
92
97
93
98
94
99
More to explore
0 commit comments