Skip to content

Commit

Permalink
Add root access example
Browse files Browse the repository at this point in the history
  • Loading branch information
Glen Van Ginkel committed Oct 10, 2020
1 parent 8b6f3bc commit b26e11e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ TreeInterpreter.search(ast, {foo: {bar: 'BAZ'}})

2. ### Root value access with `$` symbol

```javascript
search({foo: {bar: 999}, baz: [1, 2, 3]}, '$.baz[*].[@, $.foo.bar]')
// OUTPUTS:
// [ [ 1, 999 ], [ 2, 999 ], [ 3, 999 ] ]
```


## More Resources
Expand Down

0 comments on commit b26e11e

Please sign in to comment.