I have a json file url - http://****
and want to print ticket price and id from it. I am stuck & do not know how to proceed.
The code I have is
#!/usr/bin/python
import json
from pprint import pprint
json_data=open('./test.json')
data= json.load(json_data)
pprint(data)
json_data.close()
With the above code , i am getting output as
[{u'currency': u'USD',
u'exchange': u'USNASD',
u'id': u'CA98420N1050',
u'name': u'Xenon Pharmaceuticals Inc',
u'price': 7.85,
u'ticker': u'XENE'},
{u'currency': u'EUR',
u'exchange': u'XDUB',
u'id': u'IE0003295239',
u'name': u'FYFFES PLC',
u'price': 1.47}]
I dont kow why I am getting U as output and I know want ticker, id and price from this file. Help!
This should be treated as confidential and not posted publicly. i.e. don't post this on Stack Overflow or share