json.fromList: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function json.fromList== '''Introduced in MapTool 1.3b49''' Creates a Macros:json array from a Macros:string list. ===Usage=== <source lang="mtmacro" line> [h: jarr = jso...)
 
m (Applied Template:MacroFunction)
Line 1: Line 1:
==Function json.fromList==
{{MacroFunction
 
|name=json.fromList
 
|version=1.3b49
 
|description=
'''Introduced in MapTool 1.3b49'''
 
Creates a [[Macros:json array|json array]] from a [[Macros:string list|string list]].  
Creates a [[Macros:json array|json array]] from a [[Macros:string list|string list]].  


===Usage===
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: jarr = json.fromList(strProp)]
[h: jarr = json.fromList(strProp)]
</source>
</source>


 
|example=
===Examples===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r:json.fromList("a,1,g,4")]
[r:json.fromList("a,1,g,4")]
Line 20: Line 17:
Returns
Returns
   ["a",1,"g",4]
   ["a",1,"g",4]
}}
[[Category:JSON Function]]

Revision as of 02:04, 9 March 2009

json.fromList() Function

Introduced in version 1.3b49
Creates a json array from a string list.

Usage

[h: jarr = json.fromList(strProp)]

Example

[r:json.fromList("a,1,g,4")]

Returns

["a",1,"g",4]