'How do I get specific values from a lua table?

I have a local that prints {"text1":value1, "text2":value2, "text3":value3}.

The local is from an export that returns a table, so I used json.encode to get the table, but I don't know where to go from here. How would I get the values inside the brackets seperately?

lua


Solution 1:[1]

d=json.decode('{"text1":"value1", "text2":"value2", "text3":"value3"}'); print(d.text1)

Solved by @Egor Skriptunoff

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 curlyjet