Combining two tables and keeping their indexes?

I’ve searched for ways to combine two tables and keep their indexes but they all return in a ordered way. Basically my issue is I have 2 tables:

-- table1:
local a = {yes = "yes"}
-- table2:
local b ​= {no= "no"}

And I need a way to combine these tables and get a output like this:

local c = combine(
   a, b
) -- {yes = "yes", no = "no"}

How could I do this?

Why couldn’t you just do?

function Combine(a, b)
    local result = {}
    for key, value in pairs(a) do
        result[key] = value
    end
    for key, value in pairs(b) do
        result[key] = value
    end
    return result
end