I need to check if JSON request have specified field. My request can be:
{"ip": "8.35.60.229", "blackListCountry" : "Az"} or simply: {"ip": "8.35.60.229"}.
How to check if blackListCountry is exists in it?
userIP = request.json["ip"]
blackListCountry = request.json["blackListCountry"]
print(blackListCountry)
dict.