Search
 
SCRIPT & CODE EXAMPLE
 

LUA

how to delete a key in a table lua

local test = {"a", "b", "c"}

local function removeKey(tbl, key)
	for k,v in pairs(tbl) do
    	if (v == key) then
        	table.remove(tbl, key)
        end
    end
end

removeKey(test, "c")
Comment

PREVIOUS NEXT
Code Example
Lua :: roblox lua on player chatted 
Lua :: lua click detection 
Lua :: roblox send message script 
Lua :: if part is touched 
Lua :: roblox what is the difference between __index and __newindex 
Lua :: luau how to make debounce 
Lua :: roblox tween color3 
Lua :: how do you find a humanoid in roblox 
Lua :: luau table.find 
Lua :: loop true childs roblox 
Lua :: roblox wait for character 
Lua :: lua while loops 
Lua :: roblox math.random 
Lua :: check lua version 
Lua :: Best way to get player from character? 
Lua :: lua class 
Lua :: roblox lua how to apply gravity to a object 
Lua :: Lua how to get the index of a nested table 
Lua :: awesomewm wibar configuration transparent 
Lua :: lua compare time 
Matlab :: matlab unix time to datetime 
Matlab :: matlab for loop syntax 
Matlab :: matlab import data 
Basic :: google sheets split column 
Basic :: VBA Initialise/Initialize String/Number Array (not variant) 
Elixir :: elixir module 
Elixir :: elixir error 
Scala :: filter by timestamp scala 
Actionscript :: add to github 
Excel :: google sheets apply formula to entire column 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =