How it works
- Give it JSON text, or a list or dictionary from an earlier step.
- Write the path as names and positions, like settings.volume or items[0].name; a leading $. is accepted too, and an empty path returns the whole value.
- If the path leads nowhere, the step doesn't fail: it reports that the value isn't there, so you can branch on it.
- Text that isn't valid JSON fails with a hint to check the quotes, commas and brackets.
Routines that use it
Temperature from a weather API
HTTP request fetches the forecast, Read JSON value takes current.temp, and Show banner displays it.
Copied JSON snippet
Get clipboard reads JSON you copied from a web tool, and Read JSON value pulls out the id for Type text to enter.
Script output
Run PowerShell prints a result, and Read JSON value picks the field the next step needs.
Settings
| Setting | What it does |
|---|---|
| Json | JSON text, or a list or dictionary from an earlier step. |
| Path | Which value, like settings.volume or items[0].name. Keep empty for the whole value. |
Good to know
- Paths use names and list positions only; filters and wildcards aren't supported.
Questions
- How do I get one field from a JSON response?
- Pass the response to Read JSON value and write the path to the field, such as data.items[0].id. The value comes out as the step's output for later steps.
- What happens if the field doesn't exist?
- The step still succeeds and reports that the value wasn't found. Use that result in an If to handle missing data.