local function g(V)local j={}for V,O in pairs(V)do local f=V if typeof(V)=="\115\116\114\105\110\103"then f=string.lower(string.sub(V,1,1))..string.sub(V,2)end local n=O if typeof(O)=="\116\097\098\108\101"then n=g(O)end j[f]=n end return j end return g
--[[
	The web endpoints return information in a camelCase format, however the convention for game engine APIs is to return
	infomration in a PascalCase format. To avoid needing to change all our code to access data returned as PascalCase
	we use this helper function to convert it back to camelCase
]]

local function tableToCamelCaseKeys(oldTable)
	local newTable = {}
	for k, v in pairs(oldTable) do
		local newKey = k
		if typeof(k) == "string" then
			newKey = string.lower(string.sub(k, 1, 1)) .. string.sub(k, 2)
		end
		local newValue = v
		if typeof(v) == "table" then
			newValue = tableToCamelCaseKeys(v)
		end
		newTable[newKey] = newValue
	end
	return newTable
end

return tableToCamelCaseKeys
