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