Im trying to turn a string into a table, but for some reason JSONDecode wont turn the string into a table. But it turns the string into a string.
function module.Merge(t)
local result = ""
for i, v in pairs(t) do
result = result .. v
end
result = result..'"'
result = game:GetService("HttpService"):JSONDecode(result)
print(result)
print(typeof(result))
return result
end```
no errors comes, and when printing the typeof it prints "string"
https://gyazo.com/c5f009176b14367a9b00397b21829b5a
btw, the code above is supposed to merge tables into just 1 table, everything works fine expect for turning it back into a table.
how do i stop the code block thing
So I assume that you used JSONEncode to merge the tables into just 1 table
and you cannot decode it using the same html method?
Also, I hate you for being in the discord channel, just saying
It is not used to convert strings into table,
but instead, it is used to convert any other language into UTF8
since your string is already in UTF8, it will return the same string again.
I sent a screenshot of the string im trying to turn into a table above. It first turns the tables into a string to merge them, but then i need to turn them back into just 1 table.
All the tables that im trying to merge was originally just 1 table that was split up.To send it over an remote event.