JSON
14 commands. Toolkit id ooa.json.
| Command | What it does |
|---|---|
| Convert to JSON text | Write a value (Dictionary, List, table...) as JSON text. |
| Convert to table | Turn a JSON list of records into a table: each key becomes a column, each record a row. |
| Delete node | Remove one value from JSON, found by its path (order.items[0]). |
| End session | Close a JSON session, optionally saving its document to a file first. |
| Get node list | Read the list found at a path, ready to go through with a Loop. |
| 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. |
| Get several node values | Read several values at once into a Dictionary, e.g. {"id": "order.id", "email": "customer.email"}, each turned into a type if you want. |
| Insert node | Add a value to JSON: a new key, or an item in a list at a position such as order.items[1]. |
| Parse JSON | Read JSON text into a Dictionary or a List. |
| Read JSON file | Read a JSON file into a Dictionary or a List. |
| Start session | Load JSON (text, a value or a file) once as a named session, so later steps read and change it without passing it along. |
| Update node | Change one value in JSON, found by its path; a list there can be replaced or added to. |
| Validate JSON | Check JSON: that it is well written, that the paths you need are there and, if you give one, that it follows a JSON Schema. |
| Write JSON file | Save a value to a JSON file (written in one go, so a reader never sees half a file). |