编辑代码

-- JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
local function uniqueTab(_src,_dest)
        if _src then
            local res = {}
            if _dest then
                for k1, v1 in pairs(_src) do
                    
                    if _dest[k1] then
                        if type(v1) == "table" then
                            res[k1] = uniqueTab(v1,_dest[k1])
                        else
                            if v1 ~= _dest[k1] then
                                res[k1] = v1
                            end
                        end
                    else
                        res[k1] = v1
                    end
                end
            else
                res = table.deepcopy(_src)
            end
            return res
        end
    end

local a = {
		["enhance"]=
		{
			["equipLvs"]=
			{
				[6]=13,
				[2]=13,
				[8]=13,
				[3]=13,
				[1]=14,
				[4]=13,
				[5]=13,
				[7]=13,
			},
			["specailLv"]=13,
			["suitLv"]=1,
		},
}
local b = {
    ["enhance"]=
    {
        ["equipLvs"]=
        {
            [1]=13,
            [2]=13,
            [3]=13,
            [4]=13,
            [5]=13,
            [6]=13,
            [7]=13,
            [8]=13,
        },
        ["suitLv"]=1,
        ["specailLv"]=13,
    },
}
local c = {a={1,2,3}}
print(c)