json.get

From RPTools Wiki
Revision as of 12:03, 24 December 2008 by Craig (talk | contribs) (New page: ==Function json.get== '''Introduced in MapTool 1.3b49''' Returns the value in a Macros:json array at the specified index, or returns the value from Macros:json object for the...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function json.get

Introduced in MapTool 1.3b49

Returns the value in a json array at the specified index, or returns the value from json object for the specified key.

Usage

[h: jarr = json.get(index)]
[h: jarr = json.get(key)]


Examples

  [h:a=json.fromStrProp("a=1;b=44;c=12")] [json.get(a,"b")]
  [h:a=json.fromList("1,44,12")] [json.get(a,1)]

Returns

 44
 44