Skip to content

Commit 53ddce0

Browse files
committed
Update README filter examples.
1 parent 078280c commit 53ddce0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ $...title
230230
Filters allow you to remove nodes from a selection using a Boolean expression. Within a filter, `@` refers to the current node and `$` refers to the root node in the target document. `@` and `$` can be used to select nodes as part of the expression. Since version 0.3.0, the parentheses are optional, as per the IETF JSONPath draft. These two examples are equivalent.
231231

232232
```text
233-
$..products.*[?(@.price < $.price_cap)]
233+
$..products[?(@.price < $.price_cap)]
234234
```
235235

236236
```text
237-
$..products.*[[email protected] < $.price_cap]
237+
$..products[[email protected] < $.price_cap]
238238
```
239239

240240
Comparison operators include `==`, `!=`, `<`, `>`, `<=` and `>=`. Plus `<>` as an alias for `!=`.
@@ -246,7 +246,7 @@ Comparison operators include `==`, `!=`, `<`, `>`, `<=` and `>=`. Plus `<>` as a
246246
`=~` matches the left value with a regular expression literal. Regular expressions use a syntax similar to that found in JavaScript, where the pattern to match is surrounded by slashes, optionally followed by flags.
247247

248248
```text
249-
$..products.*[?(@.description =~ /.*trainers/i)]
249+
$..products[?(@.description =~ /.*trainers/i)]
250250
```
251251

252252
Filters can use [function extensions](#function-extensions) too.

0 commit comments

Comments
 (0)