local C=require(script.Parent.join)local function Z(J)local N=type(J)assert(N=="\116\097\098\108\101","\101\120\112\101\099\116\101\100 \097 \116\097\098\108\101 \102\111\114 \102\105\114\115\116 \097\114\103\117\109\101\110\116\044 \103\111\116 "..N)local F={}for J,N in pairs(J)do if type(N)=="\116\097\098\108\101"then F=C(Z(N),F)else F[J]=N end end return F end return Z

local join = require(script.Parent.join)

local function flatten(dictionary)
	local dictionaryType = type(dictionary)
	assert(dictionaryType == "table", "expected a table for first argument, got " .. dictionaryType)
	
	local new = {}

	for k, v in pairs(dictionary) do
		if type(v) == "table" then
			new = join(flatten(v), new)
		else
			new[k] = v
		end
	end

	return new
end

return flatten