JSON_ArrayRemoveItem
%JSON_ArrayRemoveItem function
Function
Removes an item at the given index from the JSON array.
Declaration
%JSON_ArrayRemoveItem(
INT in handle,
INT in index
)Parameters
handle | Handle to JSON array. |
index | Index |
Return value
None
Description
Function removes an item at the given index from the JSON array
If the handle on the JSON array is invalid or the index is invalid, an exception is thrown.
If the array is shared, the handle gets a private copy of the array and the change is not visible in the parent object or array. See Sharing of arrays.
Example
INT _arr
_arr := %JSON_ArrayFromString('[[1,2,3],[4,5,6]]')
%JSON_ArrayRemoveItem(_arr, 1)
%JSON_FreeArrayHandle(_arr)