Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you convert a string to a table?

Eg: "{yes=3, no=4}" = {yes=3, no=4}

2 answers

I don't know what Eg is but:

local String = "HELLO"
local table = {String}

1 comment

1

@VikingCatto wants to convert a string like "{MyKey = 10, Test = true}" to a table that contains the key MyKey with the value 10 and the key Text with the value true,

JSONDecode

You could use this method to convert a string into a table i have provided a link below on how to use it.

JSONDecode

This discussion is preserved as it was. New answers, comments, and votes are closed.