Reputation: 906
am new to Python and need to parse the date and '4. close' from the following JSON. Would be very grateful for pointers how to do this the pythonic way.
{'2017-01-24': {'1. open': '207.8600',
'2. high': '209.4000',
'3. low': '207.7479',
'4. close': '208.9700',
'5. adjusted close': '208.0046',
'6. volume': '1940125',
'7. dividend amount': '0.00',
'8. split coefficient': '1.0000'},...
Upvotes: 0
Views: 987
Reputation: 2684
You can parse JSON like this:
import json
from pprint import pprint
with open('path_of_file.json') as data_file:
data = json.load(data_file)
pprint(data)
Upvotes: 1