json.append

From MapToolDoc
Jump to: navigation, search

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

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

Example

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

Returns

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