json.fromList: Difference between revisions
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...) |
Verisimilar (talk | contribs) m (Applied Template:MacroFunction) |
||
Line 1: | Line 1: | ||
= | {{MacroFunction | ||
|name=json.fromList | |||
|version=1.3b49 | |||
|description= | |||
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= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: jarr = json.fromList(strProp)] | [h: jarr = json.fromList(strProp)] | ||
</source> | </source> | ||
|example= | |||
<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]