I need help changing the name of the .txt output file to the date inside the json file, is it possible?
Json:
"date": "2018-03-21",
python:
import urllib.request, json
with urllib.request.urlopen("http://api.fixer.io/latest?&base=EUR") as url:
data=json.loads(url.read().decode())
print(data)
with open('*changeNameHere*{}.txt'.format(*Example*), 'w') as outfile:
json.dump(data["rates"], outfile)