User Tools

Site Tools


token:JSONValue

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
token:JSONValue [2019/06/24 05:00]
peternlewis [Example]
token:JSONValue [2019/06/24 23:39] (current)
peternlewis
Line 13: Line 13:
 Strict mode affects how the result will be returned. ​ In Strict mode, the result will be a strict JSON objects - strings will be double quoted and appropriately escaped. ​ In Non-Strict mode, string results will be returned as the decoded and de-quoted string. Other types of results will be the same regardless of the Strict mode (containers are always be strictly JSON objects) (See the [[manual:​JSON]] user manual section). Strict mode affects how the result will be returned. ​ In Strict mode, the result will be a strict JSON objects - strings will be double quoted and appropriately escaped. ​ In Non-Strict mode, string results will be returned as the decoded and de-quoted string. Other types of results will be the same regardless of the Strict mode (containers are always be strictly JSON objects) (See the [[manual:​JSON]] user manual section).
  
-===== Example ​=====+===== Examples ​=====
  
 If a Keyboard Maestro variable `J` contains the JSON object: If a Keyboard Maestro variable `J` contains the JSON object:
Line 30: Line 30:
 | `%JSONValue%J.d[2]%` | `two` | (Compact/​Pretty variant has no affect) | | `%JSONValue%J.d[2]%` | `two` | (Compact/​Pretty variant has no affect) |
 | `%JSONValueStrict%J.d[2]%` | `"​two"​` | (Compact/​Pretty variant has no affect) | | `%JSONValueStrict%J.d[2]%` | `"​two"​` | (Compact/​Pretty variant has no affect) |
-| `%JSONValueStrict%J.d[0]%` | `3` | (Variants have no affect) |+| `%JSONValue%J.d[0]%` | `3` | (Variants have no affect) | 
 +| `%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 ​JSONVALUE(jsonpath)]] 
 +* [[function:​COUNT | COUNT()]]
 * [[:​Functions|See all Functions]] * [[:​Functions|See all Functions]]
  
Line 52: Line 57:
 * [[token:​JSONFromDictionary | JSONFromDictionary]] * [[token:​JSONFromDictionary | JSONFromDictionary]]
 * [[token:​JSONFromVariables | JSONFromVariables]] * [[token:​JSONFromVariables | JSONFromVariables]]
-* [[token:​JSONValue | JSONValue]] 
 * [[:​Tokens|See all Tokens]] * [[:​Tokens|See all Tokens]]
 +
 +=== Collections ===
 +
 +* [[collection:​JSON_Keys | JSON Keys]]
 +* [[:​Collections |See all Tokens]]
 +
token/JSONValue.1561366818.txt.gz · Last modified: 2019/06/24 05:00 by peternlewis