Tables can only be read without any problems use the Output Tab, is you’d like to view it using the Console (which does not deserialize tables) you’ll have to make your own.
Here’s one I made
-- Makes a table readable
function deserialize(tb: {any}): string
local function serializeHelper(tbl: {any}, indent: number): string
local result = "{\n"
local indentStr = string.rep(" ", indent)
for key, value in pairs(tbl) do
local keyStr = (type(key) == "string") and `["{key}"]` or `[{tostring(key)}]`
if typeof(value) == "table" then
result ..= indentStr .. keyStr .. " = " .. serializeHelper(value, indent + 1) .. ",\n"
elseif typeof(value) == "string" then
result ..= indentStr .. keyStr .. ` = "{value}",\n`
else
result ..= indentStr .. keyStr .. " = " .. tostring(value) .. ",\n"
end
end
return result .. string.rep(" ", indent - 1) .. "}"
end
return serializeHelper(tb, 1)
end
local ExampleTable = {
User1 = {1,2,3},
User2 = {2,3,1},
User3 = {3,2,1}
}
print("-- SERIALIZED")
print(ExampleTable)
print("----------")
print(`{ExampleTable}`) -- eg, table:0x12rbu3f
print("-- DE-SERIALIZED")
print(deserialize(ExampleTable))
print("----------")
print(`{deserialize(ExampleTable)}`) -- gives exact result.