json.fromStrProp: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) m (Applied Template:MacroFunction) |
No edit summary |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 3: | Line 3: | ||
|version=1.3b49 | |version=1.3b49 | ||
|description= | |description= | ||
Creates a [[ | Creates a [[JSON Object|json object]] from a [[Macros:string property list|string property list]]. | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
json.fromStrProp(propList) | |||
</ | json.fromStrProp(propList,delim) | ||
</syntaxhighlight> | |||
'''Parameters''' | |||
{{param|propList|String property list to extract data from.}} | |||
{{param|delim|Delimiter between fields (default is {{code|";"}}).}} | |||
|example= | |example= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r:json.fromStrProp("a=1;b=44;c=12")] | [r:json.fromStrProp("a=1;b=44;c=12")] | ||
</ | </syntaxhighlight> | ||
Returns | Returns |
Latest revision as of 17:46, 15 March 2023
json.fromStrProp() Function
• Introduced in version 1.3b49
Creates a json object from a string property list.
Usage
json.fromStrProp(propList)
json.fromStrProp(propList,delim)
Parameters
propList
- String property list to extract data from.delim
- Delimiter between fields (default is";"
).
Example
[r:json.fromStrProp("a=1;b=44;c=12")]
Returns
{"a":1,"c":12,"b":44}