How it works
- Choose the JSON file and the path to the value, written like settings.volume or profiles[0].name.
- Leave the path empty to get the whole file.
- It outputs the value and whether it was found, so an If can handle a missing entry.
- It only reads, so dry runs behave exactly like real ones.
Routines that use it
Volume from a config file
Read a volume level from your settings file and pass it to Set volume, so changing the file changes the routine.
Pick a profile
Read the first profile's name from a JSON list and use Switch to run a different set of steps for each one.
Count up between runs
Read a counter, raise it with Calculate, and save it back with Write JSON value.
Settings
| Setting | What it does |
|---|---|
| Path | The JSON file. |
| Value path | Which value, like settings.volume or profiles[0].name. Keep empty for the whole file. |
Good to know
- A cloud "online only" file is not read; it needs to be on the PC first.
Questions
- How do I read one setting from a JSON file?
- Add Read JSON value, pick the file and type the value's path, such as audio.volume. The value comes out as the step's output for later steps.
- What if the value isn't in the file?
- The step tells you it wasn't found through its found output, so you can branch with If instead of using an empty value.