User Tools

Site Tools


manual:JSON

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 Both sides next revision
manual:JSON [2019/06/24 05:01]
peternlewis [Pretty, Compact and Strict Flags]
manual:JSON [2019/06/24 08:07]
peternlewis [JSON Paths]
Line 30: Line 30:
 * “.” followed by the field name.  Field names are trimmed of leading or trailing whitespace - if your object field names can start or end with white space, you need to use the `{ field name }` notation. * “.” followed by the field name.  Field names are trimmed of leading or trailing whitespace - if your object field names can start or end with white space, you need to use the `{ field name }` notation.
  
-Array indices are 1-based. ​ The 0 index of an array access will return the count of the number of entries in the array.+Array indices are 1-based.  Negative indices count from the end of the array.  The 0 index of an array access will return the count of the number of entries ​in the array. ​ When evaluating the index, the context sensitive COUNT() function will return the number of elements ​in the array.
  
 Keyboard Maestro will use arrays and dictionaries more or less interchangeably,​ so: Keyboard Maestro will use arrays and dictionaries more or less interchangeably,​ so:
Line 39: Line 39:
  
 will all return the third element of an array, or the dictionary value for key “3”. ​ And important distinction is that the first one is a numeric calculation,​ the second one is plain text, and the third one is token text. will all return the third element of an array, or the dictionary value for key “3”. ​ And important distinction is that the first one is a numeric calculation,​ the second one is plain text, and the third one is token text.
- 
  
 ===== Pretty, Compact and Strict Flags ===== ===== Pretty, Compact and Strict Flags =====
manual/JSON.txt · Last modified: 2023/10/02 02:33 by peternlewis