function:JSONVALUE
**This is an old revision of the document!**
JSONVALUE
The JSONVALUE() function takes a JSON path and returns the numeric result.
JSONVALUE(jsonpath) is more or less equivalent to CALCULATE(%JSONValue%jsonpath%).
Examples
If a Keyboard Maestro variable J contains the JSON object:
{"a":9, "b":"bravo", "c":null, "d":[11,"two",33]}
Then these would be the results:
| Token | Result | Comment |
|---|---|---|
JSONVALUE(J.a) | 9 | |
JSONVALUE(J.d[1]) | 11 | |
JSONVALUE(J.d[3]) | 33 | |
JSONVALUE(J.d[1+2]) | 33 | entry 3 |
JSONVALUE(J.d[0]) | 3 | the number of entries in the array |
JSONVALUE(J.d[-1]) | 33 | the last entry |
JSONVALUE(J.d[COUNT()]) | 33 | the last entry |
See Also
See the JSON user manual section for more details on JSON.
Actions
Functions
Tokens
function/JSONVALUE.1561378186.txt.gz · Last modified: by peternlewis
