RPTools

Personal tools
From MapToolDoc

json.remove

json.remove() Function

Introduced in version 1.3b49

Removes a field from a JSON Object, or the value at the specified index from a JSON Array.

Usage

  1. [h: jarr = json.remove(jarr, index)]
  2. [h: jarr = json.remove(jobj, key)]

Examples

  1.   [h:a=json.fromStrProp("a=1;b=44;c=12")] [r:json.remove(a, "c")]
  2.   [h:a=json.fromList("a,1,g,4")][r:json.remove(a,3)]

Returns

 {"a":1,"b":44}
 ["a",1,"g"]