Remove Index From List | ARRAY_DELETE
Syntax
ARRAY_DELETE( [value], [index] )
Parameters
value
The ARRAY the index is being deleted from.
index
The index in the array to be deleted.
The first index is 0.
If a negative value is provided, it is indexed from the end.
For example, the index -1 can be used to delete the last index in the array.
Return Value
An updated array with INDEX removed from the VALUE is returned.Description
Deletes an index in an array. The operation creates a new array with the update and does not modify the original array.Examples
ARRAY_DELETE([1, 2, 3], 1) # returns [1, 3]
ARRAY_DELETE([1, 2, 3], -2) # returns [1, 3]
ARRAY_DELETE([1, 2, 3], 3) # returns [1, 2, 3]
ARRAY_DELETE([1, 2, 3], -4) # returns [1, 2, 3]