9951 explained code solutions for 126 technologies


luaHow to join tables


This approach will append all items from second table to the first one:

for k,v in pairs(tbl2) do
  table.insert(tbl1, v)
endctrl + c
for k,v in pairs(tbl2)

iterate through all elements of second table

tbl2

second table to add to first one

tbl1

first table to join with second

table.insert

will append given value to the given table