All of my table entires are disappearing and getting replaced

Greetings, I was wondering if anyone can find what is wrong with this code as all table values are replaced to one language, getting the data from the API is fine but once I have it my table entries get replaced.

local function sendReq(lang, token)
	local newMenuItems = {}
	for i,v in pairs(menuItems) do
		newMenuItems[i] = v
	end

	local fields = {
		{"auth_key", token}
	}
	table.insert(fields, 2, {"target_lang", lang})
	for i,v in pairs(menuItems) do
		table.insert(fields, #fields + 1, {"text", v[3]})
	end
	local data2 = ""
	local url = "APILINK"
	local data = ""
	for index, value in pairs(fields) do
		data2 = data2 .. ("&%s=%s"):format(
		httpService:UrlEncode(value[1]),
		httpService:UrlEncode(value[2])
		)
	end
	local success1, err1 = pcall(function()
		data = data:sub(1)
		wait(2)
		local res = httpService:PostAsync(url, data2, Enum.HttpContentType.ApplicationUrlEncoded)
		local decoded = httpService:JSONDecode(res)
		for i,v in pairs(decoded["translations"]) do
			newMenuItems[i][3] = v["text"]
		end
	end)
	wait(2)

	local fields2 = {
		{"auth_key", token}
	}
	table.insert(fields2, 2, {"target_lang", lang})
	for i,v in pairs(menuItems) do
		table.insert(fields2, #fields2 + 1, {"text", v[4]})
	end
	local data2 = ""
	local url = "APILINK"
	local data = ""
	for index, value in pairs(fields2) do
		data2 = data2 .. ("&%s=%s"):format(
			httpService:UrlEncode(value[1]),
			httpService:UrlEncode(value[2])
		)
	end
	local success1, err1 = pcall(function()
		data = data:sub(1)
		wait(2)
		local res = httpService:PostAsync(url, data2, Enum.HttpContentType.ApplicationUrlEncoded)
		local decoded = httpService:JSONDecode(res)
		for i,v in pairs(decoded["translations"]) do
			newMenuItems[i][4] = v["text"]
		end
	end)
	print(newMenuItems)
	return newMenuItems
end
local function german()
	local data = sendReq("DE", "secret")
	if data then
		allLanguages["German"] = data
		print(data)

	end
	print(data)
	print("DONE!")
end
local function french()
	local data01 = sendReq("FR", "secret")
	if data01 then
		allLanguages["French"] = data01
		print(data01)
	end
end
local function russian()
	local data02 = sendReq("RU", "secret")
	if data02 then
		allLanguages["Russian"] = data02
		print(data)
	end
end
local function italian()
	local data03 = sendReq("IT", "secret")
	if data03 then
		allLanguages["Italian"] = data03
		print(data03)
	end
end
local function romanian()
	local data04 = sendReq("RO", "secret")
	if data04 then
		allLanguages["Romanian"] = data04
		print(data04)
	end
end
local function spanish()
	local data05 = sendReq("ES", "secret")
	if data05 then
		allLanguages["Spanish"] = data05
		print(data05)
	end

end
local function czech()
	local data06 = sendReq("CS", "secret")
	if data06 then
		allLanguages["Czech"] = data06
		print(data06)
	end
end
print(allLanguages)
print(#data == #menuItems)
local function checkIfUpdateIsNeeded(datastoresData, menuItems)
	if data then
		if  #menuItems == #datastoresData == false then
			return true
		end
		for i,v in pairs(menuItems) do
			print(v)
			print(datastoresData[i])
			if datastoresData[i] ~= nil then
				if not datastoresData[i] == v then
					return true
				end
			else
				return true
			end
		end
	end
	return false
end
local updateNeeded = checkIfUpdateIsNeeded(data, menuItems)
if updateNeeded == true then
	print("Updating menu please wait.")
	datastore:SetAsync("English", menuItems)
	print("Menu item change")
	german()
	wait(3)
	french()
	wait(3)
	russian()
	wait(3)
	italian()
	wait(3)
	romanian()
	wait(3)
	spanish()
	wait(3)
	czech()
	print(allLanguages, " Before end")
	local success111, err111 = pcall(function()
		datastore:SetAsync("all", allLanguages)
	end)
	if not err111 then
		print("Successfully updated menu.")
	end
else
	local data = nil
	local success111, err111 = pcall(function()
		 data = datastore:GetAsync("all")
	end)
	if not err111 then
		allLanguages = data
		allLanguages["English"] = config.menuItems
	end
end

All entries are replaced with one language.

tl;dr but what do you exactly mean by “table entries getting replaced”? Does it refer to the table being replaced by another table? Also if you can try debugging your code by adding print statements along the way, that would help you identify where the table is getting replaced at.

A bit more context will help me figure it out.

I have it set out like this allLanguages[“English”] = {
language data }
But all results get replaced with Spanish.

I am still looking for solutions.