You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 72dc3b4
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -360,7 +382,7 @@ may be helpful (set to `xml` or `xml-strict`).
360
382
|`/store/*/*[name(parent::*) != 'book']`|`$.store.*[?(@parentProperty !== "book")]`| Grabs the grandchildren of store whose parent property is not book (i.e., bicycle's children, "color" and "price") |`@parentProperty` is not present in the original spec |
361
383
|`//book[count(preceding-sibling::*) != 0]/*/text()`|`$..book.*[?(@parentProperty !== 0)]`| Get the property values of all book instances whereby the parent property of these values (i.e., the array index holding the book item parent object) is not 0 |`@parentProperty` is not present in the original spec |
362
384
|`//book[price = /store/book[3]/price]`|`$..book[?(@.price === @root.store.book[2].price)]`| Filter all books whose price equals the price of the third book |`@root` is not present in the original spec |
363
-
|`//book/../*[. instance of element(*, xs:decimal)]` (in XPath 2.0) |`$..book..*@number()`| Get the numeric values within the book array |`@number()`, the other basic types (`@boolean()`, `@string()`), other low-level derived types (`@null()`, `@object()`, `@array()`), the JSONSchema-added type, `@integer()`, the compound type `@scalar()` (which also accepts `undefined` and non-finite numbers for JavaScript objects as well as all of the basic non-object/non-function types), the type, `@other()`, to be used in conjunction with a user-defined callback (see `otherTypeCallback`) and the following non-JSON types that can nevertheless be used with JSONPath when querying non-JSON JavaScript objects (`@undefined()`, `@function()`, `@nonFinite()`) are not present in the original spec |
385
+
| `//book/../*[. instance of element(*, xs:decimal)]` (in XPath 2.0) | `$..book..*@number()` | Get the numeric values within the book array | `@number()`, the other basic types (`@boolean()`, `@string()`), other low-level derived types (`@null()`, `@object()`, `@array()`), the JSONSchema-added type, `@integer()`, the compound type `@scalar()` (which also accepts `undefined` and non-finite numbers for JavaScript objects as well as all of the basic non-object/non-function types), the type, `@other()`, to be used in conjunction with a user-defined callback (see `otherTypeCallback`). The special JSON type `@jsonReference()` is also provided, and the following non-JSON types can nevertheless also be used with JSONPath when querying non-JSON JavaScript objects (`@undefined()`, `@function()`, `@nonFinite()`, `@symbol()`, `@BigInt()`, and `@Promise`) are not present in the original spec |
364
386
|`//book/*[name() = 'category' and matches(., 'tion$')]` (XPath 2.0) |`$..book.*[?(@property === "category" && @.match(/TION$/i))]`| All categories of books which match the regex (end in 'TION' case insensitive) |`@property` is not present in the original spec. |
365
387
|`//book/*[matches(name(), 'bn$')]/parent::*` (XPath 2.0) |`$..book.*[?(@property.match(/bn$/i))]^`| All books which have a property matching the regex (end in 'TION' case insensitive) |`@property` is not present in the original spec. Note: Uses the parent selector `^` at the end of the expression to return to the parent object; without the parent selector, it matches the two `isbn` key values. |
366
388
||`` ` `` (e.g., `` `$`` to match a property literally named `$`) | Escapes the entire sequence following (to be treated as a literal) |`` ` `` is not present in the original spec; to get a literal backtick, use an additional backtick to escape |
0 commit comments