8000 Fixed quick start example of expression building. · doanlisa/python-jsonpath-rw@36c32aa · GitHub
[go: up one dir, main page]

Skip to content

Commit 36c32aa

Browse files
committed
Fixed quick start example of expression building.
Added imports of `Fields()` and `Slice()` methods so that the final line of the quick start works. An alternate fix would be to prepend calls to those methods with `jsonpath.`.
1 parent 87e2aee commit 36c32aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ Then:
5252
['number two', 'number one']
5353

5454
# You can also build expressions directly quite easily
55+
>>> from jsonpath_rw.jsonpath import Fields
56+
>>> from jsonpath_rw.jsonpath import Slice
57+
5558
>>> jsonpath_expr_direct = Fields('foo').child(Slice('*')).child(Fields('baz')) # This is equivalent
5659

5760
JSONPath Syntax

0 commit comments

Comments
 (0)
0