hello below is my code
i want to be able to search for specific data in this json api
PHP Code
<?php
import urllib.request
import json
##inp = input("enter website address : ")
##url= urllib.request.urlopen("http://freegeoip.net/json/{}".format(inp))
url= urllib.request.urlopen("http://data.gov.jm/api/action/datastore/search.json?resource_id=da5f0429-18ba-4d38-bd03-26171b81309c&limit=1")
data = json.loads(url.read().decode())
#print('IP : {}'.format(data['ip']))
print(data)
#print('Division : {}'.format(data['Clarendon']))
#print('Year : {}'.format(data[2007]))
#print('Fatalities : {}'.format(data['']))
#print(data["Division"])
if data[{"Division"}] == "Clarendon":
print(data[{"Division"}])
print(data[{"Fatalities"}])
Knowledge is Power - Be Powerful!!!!!
LIFE IS A CHALLENGE SO ACCEPT IT!
LIFE IS A CHALLENGE SO ACCEPT IT!

