json.contains

From RPTools Wiki
Revision as of 12:10, 24 December 2008 by Craig (talk | contribs) (New page: ==Function json.contains== '''Introduced in MapTool 1.3b49''' Returns 1 if the json object contains the specified key. ===Usage=== <source lang="mtmacro" line> ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function json.contains

Introduced in MapTool 1.3b49

Returns 1 if the json object contains the specified key.

Usage

[h: value = json.contains(jobj, key)]


Examples

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

Returns

  1
  0