So i’ve been wondering if it’s possible to convert a JSON (LUA string) to a Lua table.
For example:
String to convert:
local objects = "{'food':{'burger', 'carrot', 'nugget'}, 'animals':{'okapi', 'unicorn' = false, 'human'}}"
Table to convert to:
local objects = {['food']={'burger', 'carrot', 'nugget'}, ['animals'] = {'okapi', ['unicorn'] = false, 'human'}}
Don’t blame me if the syntax is wrong, the thing is you get the point.
Any ideas would be appreciated. Thanks in advance
Edit:
I found out a function called JSON.parse in JavaScript, but I still need the one for Lua.