Articles → AUTOMATION ANYWHERE → Read json data in automation anywhere

Read json data in automation anywhere






Steps















Create a python program to read json data




import json


# some JSON:
x =  '{ "name":"Karan", "age":37, "city":"Gurgaon"}'

# parse x:
y = json.loads(x)

print(y["name"])
print(y["age"])
print(y["city"])





Open command prompt in automation anywhere





Click to Enlarge


Execute the python program and put output in text file




c:\python\python c:\temp\test.py > c:\temp\output.txt













Click to Enlarge


Read text file





Click to Enlarge




Click to Enlarge


Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, June 13, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250