I want to clear the items in an array without disrupting the indices; how can I remove the assigned values while keeping the indices intact? I thought I could use “Set Array Elem,” but it didn’t work for this purpose.
1 Like
Set array will work, but you need an ‘empty’ value. For instance -1 in an int array.
How do I create an empty value for an object type? If nothing is entered, the index will not be updated.
1 Like
You enter it with your ‘dummy’ value.
Or, another way to do this would be to use a map data type instead. That way you can have a sparse array.