Skip to main content

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​

InputTypeRequiredDefaultWhat it is
ValueAnyNoDictionary, List or JSON text (or use an open JSON session).
PathStringYesDotted path with [n] indexes, or JSONPath starting with $.
DefaultAnyNoValue returned when the path does not exist.
Fail if missingBooleanNofalseFail with JSON.PATH_NOT_FOUND when the path does not exist.
SessionStringNoWork on the document of this JSON session (Start session) instead of a value; changes stay in the session until End session saves them.

Outputs​

OutputTypeWhat it is
resultAnyValue at the path (a List when the path can match several values: *, .., filters, slices), or the default when nothing matches.
foundBooleanTrue when the path matched.