token:JSONValue
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| token:JSONValue [2019/06/24 08:59] – [Example] peternlewis | token:JSONValue [2024/04/22 02:23] (current) – peternlewis | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| Strict mode affects how the result will be returned. | Strict mode affects how the result will be returned. | ||
| - | ===== Example | + | ===== Examples |
| If a Keyboard Maestro variable `J` contains the JSON object: | If a Keyboard Maestro variable `J` contains the JSON object: | ||
| - | {" | + | {" |
| Then these would be the results: | Then these would be the results: | ||
| ^ Token ^ Result ^ Comment ^ | ^ Token ^ Result ^ Comment ^ | ||
| - | | `%JSONValue%J.a%` | `9` | (Variants have no affect) | | + | | `%JSONValue%J.a%` | `9` | (Variants have no effect) | |
| - | | `%JSONValue%J.b%` | `bravo` | (Compact/ | + | | `%JSONValue%J.b%` | `bravo` | (Compact/ |
| - | | `%JSONValueStrict%J.b%` | `" | + | | `%JSONValueStrict%J.b%` | `" |
| - | | `%JSONValue%J.c%` | `null` | (Variants have no affect) | | + | | `%JSONValue%J.c%` | `null` | (Variants have no effect) | |
| - | | `%JSONValue%J.d%` | `[1," | + | | `%JSONValue%J.d%` | `[11," |
| - | | `%JSONValuePretty%J.d%` | `[\n\t1, | + | | `%JSONValuePretty%J.d%` | `[\n\t11, |
| - | | `%JSONValue%J.d[2]%` | `two` | (Compact/ | + | | `%JSONValue%J.d[2]%` | `two` | (Compact/ |
| - | | `%JSONValueStrict%J.d[2]%` | `" | + | | `%JSONValueStrict%J.d[2]%` | `" |
| - | | `%JSONValueStrict%J.d[0]%` | `3` | (Variants have no affect) | | + | | `%JSONValue%J.d[0]%` | `3` | (Variants have no effect) | |
| + | | `%JSONValue%J.d[-2]%` | `two` | (the second last entry) | | ||
| + | | `%JSONValue%J.d[COUNT()]%` | `3` | (the last entry) | | ||
| + | |||
| + | The exact format of the white space in the Pretty format should not be assumed, it might be any number of spaces or tabs. | ||
| ===== See Also ===== | ===== See Also ===== | ||
| Line 45: | Line 49: | ||
| === Functions === | === Functions === | ||
| - | * [[function:DAY|DAY()]] | + | * [[function:JSONVALUE |
| + | * [[function: | ||
| * [[: | * [[: | ||
| Line 52: | Line 57: | ||
| * [[token: | * [[token: | ||
| * [[token: | * [[token: | ||
| - | * [[token: | ||
| * [[: | * [[: | ||
| + | |||
| + | === Collections === | ||
| + | |||
| + | * [[collection: | ||
| + | * [[: | ||
| + | |||
token/JSONValue.1561366744.txt.gz · Last modified: by peternlewis
