Skip to main content

Array, Map and JSON Functions

Functions for working with the collection types: arrays, maps, and JSON values.

The append, for pushing data into an array, is a Global function (see Global Functions).

concat(list1, list2)

merge two list type input into one new list

let a = [1, 2]
let b = [3, 4]
let c = concat(a, b) // c is now [1, 2, 3, 4]

delete(map, key)

  • map must be primitive map, jsonObject or object map.
  • key must be primitive string
let m = {first: 10, second: 20}
delete(m, "first") // m is now the map {second: 20}

jsonClone(jsonValue)

return a deep copy of the input json object or array

let a = {"string":"abc", "int": 1, "float": 2.01, "bool": true, "null":null, "array":[1,2,3], "map":{"foo":"bar"}}
let b = jsonClone(a)
printf("%s",b)
// {"array":[1,2,3],"bool":true,"float":2.01,"int":1,"map":{"foo":"bar"},"null":null,"string":"abc"}