json.append: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Correcting JSON Array link.)
Line 3: Line 3:
|version=1.3b49
|version=1.3b49
|description=
|description=
Appends values to the end of a [[Macros:json array|json array]]. An empty string ("") can be used to represent an empty [[Macros:json array|json array]] to append the values to.
Appends values to the end of a [[JSON Array]]. An empty string ("") can be used to represent an empty [[JSON Array]] to append the values to.


|usage=
|usage=

Revision as of 00:36, 5 April 2009

json.append() Function

Introduced in version 1.3b49
Appends values to the end of a JSON Array. An empty string ("") can be used to represent an empty JSON Array to append the values to.

Usage

[h: jarr = json.append(jarr, value, ...)]

Example

  [h:a=json.fromList("a,1,g,4")][r: json.append(a, 55)]
  [r: json.append("", 1, 5, 8, 33)]

Returns

  ["a",1,"g",4,55]
[1,5,8,33]