Get node value
Read one value from JSON by its path, such as order.items[0].sku; $..sku finds every sku, $.items[?(@.qty > 1)] the items with qty over 1.
Command in the JSON toolkit · id ooa.json/get_node · 5 inputs (1 required), 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Value | Any | No | Dictionary, List or JSON text (or use an open JSON session). | |
| Path | String | Yes | Dotted path with [n] indexes, or JSONPath starting with $. | |
| Default | Any | No | Value returned when the path does not exist. | |
| Fail if missing | Boolean | No | false | Fail with JSON.PATH_NOT_FOUND when the path does not exist. |
| Session | String | No | Work on the document of this JSON session (Start session) instead of a value; changes stay in the session until End session saves them. |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | Any | Value at the path (a List when the path can match several values: *, .., filters, slices), or the default when nothing matches. |
| found | Boolean | True when the path matched. |