How to Delete a Table Element with a Custom Iteration Tag

Let’s say I have this table for instance:

local Table = {
   ["D1B0FF40-3667-11E9-B56E-0800200C9A66"] = {Data}
   ["D1B12650-3667-11E9-B56E-0800200C9A66"] = {Data}
   ["D1B12651-3667-11E9-B56E-0800200C9A66"] = {Data}
   ["D1B12652-3667-11E9-B56E-0800200C9A66"] = {Data}
   ["D1B12653-3667-11E9-B56E-0800200C9A66"] = {Data}
}

I want to remove the 3rd element, but the syntax for table.remove() uses the element number (n) as the reference. Because of this, I am unable to remove the 3rd element because the “n” value is not a number (it’s a string “D1B12651-3667-11E9-B56E-0800200C9A66”).

How would I go about this?

1 Like

list[key] = nil

7 Likes