json.toList: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function json.toList== '''Introduced in MapTool 1.3b49''' Creates a Macros:string list from a Macros:json array. ===Usage=== <source lang="mtmacro" line> [h: jarr = json....)
 
No edit summary
Line 9: Line 9:
===Usage===
===Usage===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: jarr = json.toStrProp(jobj)]
[h: jarr = json.toList(jarr)]
</source>
</source>


Line 15: Line 15:
===Examples===
===Examples===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
   [h:a=json.fromList("a,1,g,4")][r:json.toList(a)]
   [h:a=json.toList("a,1,g,4")][json.toList(a)]
  [h:a=json.fromStrProp("a=1;b=44;c=12")] [r:json.toList(a)]
</source>
</source>


Returns
Returns
  a=1;c=12;b=44
    a,1,g,4
  a,c,b

Revision as of 10:16, 24 December 2008

Function json.toList

Introduced in MapTool 1.3b49

Creates a string list from a json array.

Usage

[h: jarr = json.toList(jarr)]


Examples

  [h:a=json.toList("a,1,g,4")][json.toList(a)]

Returns

    a,1,g,4