cancel
Showing results for 
Search instead for 
Did you mean: 

String to json in pyscript

munish
New Contributor

how can I convert string to json in python script snap including how to add library in pyscript?

1 REPLY 1

bojanvelevski
Valued Contributor

Hello @munish,

You’ll need to import the json library. When you get the stringified json (input = inDoc.get(‘json_string’)) in the script, use the following function: json.loads(input),

Hope this helps,
Regards,

Bojan Velevski