function something(t1, t2) -- two arguments, which are the two tables
local newt = {} -- make a new table
for i,v in t1 do -- iterates through table
newt[i] = v -- adds to table using index
end
for i,v in t2 do -- same exact thing with this
newt[i] = v
end
return newt -- returns the table
end
local mixedTable = something(d1, d2) -- variable as mixed table
This is very Basic tho, you would need to do more than this, if you want to merge the Descendants of the Tables.