A function that matches two tables together

I looked up to see if it’s been done before on the forums but I only got results that kinda matches with what I was looking for, so I decided to make a function that completely matches two tables together and returns true or false depending if they’re a match or not. It also works with tables inside tables inside tables.

	local function CheckMatch(A,B)
		local Check = true
		for I,V in pairs(A) do
			if type(V) == "table" then
				if type(B[I]) == "table" then 
				if CheckMatch(V,B[I]) ~= true then Check = false break end	
				else Check = false break end
				elseif V ~= B[I] then Check = false break end
		end
		return Check
	end