local Tab = {Backpack = {}, Inventory = {} }
local Data = {
Backpack = {MachineGun = {}, Pistol = {}, Poop = {}},
Inventory = {Gatling = {}, ChineseImmigrints = {}},
}
for i,v in pairs(Data) do
end
-- I want Tab to be exactly like Data
--So Tab would have Machine Gun, Pistol, Poop, and Inventory would have Gatling, Chinese Immigrints in the Tab
-- 100% efficiency
I couldn't think of a way it was just too confusing for me

3 comments
This must be a troll. Why would you use such variables
You can't really get the "most efficient" code for insertion because there are a few factors that you will need to know first such as table size and how much memory you have available.
Just iterate over every item once. This best performance you can get with this type of organization would be linear anyway.