Skip to content

Commit fcf4dd2

Browse files
committed
Update README
1 parent d15b377 commit fcf4dd2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ This repository contains an implementation of [JSONPath](http://goessner.net/art
55

66
## API
77

8+
9+
### `match` shortcut function
10+
11+
The `jsonpath2.match` function is a shortcut to match a given JSON data
12+
structure against a JSONPath string
13+
14+
```python
15+
>>> import jsonpath2
16+
>>> doc = {'hello': 'Hello, world!'}
17+
>>> [x.current_value for x in jsonpath2.match('$.hello', doc)]
18+
['Hello, world!']
19+
```
20+
821
### `Path` class
922

1023
The `jsonpath2.path.Path` class represents a JSONPath.

0 commit comments

Comments
 (0)