json.length: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) m (Macros:Functions:json.length moved to json.length) |
m (left out equal sign in description) |
||
Line 2: | Line 2: | ||
|name=json.length | |name=json.length | ||
|version=1.3b49 | |version=1.3b49 | ||
|description | |description= | ||
Returns the number of fields in a [[Macros:json object|json object]] or number of elements in a [[Macros:json array|json array]]. | Returns the number of fields in a [[Macros:json object|json object]] or number of elements in a [[Macros:json array|json array]]. | ||
Revision as of 10:39, 16 October 2009
json.length() Function
• Introduced in version 1.3b49
Returns the number of fields in a json object or number of elements in a json array.
Usage
[h: len = json.length(jobj)]
[h: len = json.length(jarr)]
Example
[h:a=json.fromStrProp("a=1;b=44;c=12")] [json.length(a)]
[h:a=json.fromList("a,1,g,4")][json.length(a)]
Returns
34