Skip to content

Commit

Permalink
Clean up syntax table
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Sep 19, 2024
1 parent cf2ef53 commit 34e2ad8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ The jsonpath package provides [RFC 9535 JSONPath] functionality in Go.

A brief overview of RFC [9535 JSONPath] syntax:

| Syntax Element | Description** |
| Syntax Element | Description** |
| ------------------ | ----------------------------------------------------------------------- |
| `$` | root node identifier |
| `@` | current node identifier (valid only within filter selectors) |
| `[<selectors>]` | child segment: selects zero or more children of a node |
| `.name` | shorthand for ['name'] |
| `.*` | shorthand for [*] |
| `.name` | shorthand for `['name']` |
| `.*` | shorthand for `[*]` |
| `..[<selectors>]` | descendant segment: selects zero or more descendants of a node |
| `..name` | shorthand for ..['name'] |
| `..*` | shorthand for ..[*] |
| `..name` | shorthand for `..['name']` |
| `..*` | shorthand for `..[*]` |
| `'name'` | name selector: selects a named child of an object |
| `*` | wildcard selector: selects all children of a node |
| `3` | index selector: selects an indexed child of an array (from 0) |
| `0:100:5` | array slice selector: start:end:step for arrays |
| `?<logical-expr>` | filter selector: selects particular children using a logical expression | |
| `?<logical-expr>` | filter selector: selects particular children using a logical expression |
| `length(@.foo)` | function extension: invokes a function in a filter expression |

## Package Stability
Expand Down

0 comments on commit 34e2ad8

Please sign in to comment.