diff options
author | Kenn Knowles <kenn.knowles@gmail.com> | 2013-03-27 15:50:28 -0400 |
---|---|---|
committer | Kenn Knowles <kenn.knowles@gmail.com> | 2013-03-27 15:50:28 -0400 |
commit | 0a92ebd921b441c5a29b9c0152d9537ee2fb0c8d (patch) | |
tree | 8a0791938b736f2d8c8652e1accb65b19afaa0ed | |
parent | d9d2a097975e003fb4ac8517393b9bf0811d3d26 (diff) | |
download | jsonpath-rw-0a92ebd921b441c5a29b9c0152d9537ee2fb0c8d.tar.gz |
Update the README.md to explain new backquote operators
-rw-r--r-- | README.md | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -28,6 +28,8 @@ Atomic expressions: Syntax | Meaning ------------------------------|------------------- `$` | The root object +`` `this` `` | The "current" object. +`` `foo` `` | More generally, this syntax allows "named operators" to extend JSONPath is arbitrary ways _field_ | Specified field(s), described below `[` _field_ `]` | Same as _field_ `[` _idx_ `]` | Array access, described below (this is always unambiguous with field access) @@ -58,9 +60,9 @@ Array specifiers ( _idx_ ): Syntax | Meaning ---------------------------------------|---------------------------------------- - - `[`_n_`]` | array index (may be comma-separated list) - - `[`_start_`?:`_end_`?]` | array slicing (note that _step_ is unimplemented only due to lack of need thus far) - - `[*]` | any array index + `[`_n_`]` | array index (may be comma-separated list) + `[`_start_`?:`_end_`?]` | array slicing (note that _step_ is unimplemented only due to lack of need thus far) + `[*]` | any array index Programmatic JSONPath @@ -89,6 +91,9 @@ Extensions None, then for any piece of data missing that field, it will be replaced by the JSONPath to it, giving automatic unique ids to any piece of data. These ids will take into account any ids already present as well. + - _Named operators_: Instead of using `@` to reference the currently object, this library + uses `` `this` ``. In general, any string contained in backquotes can be made to be + a new operator, currently by extending the library. More to explore |