Answers for "json data check"

0

json data check

import json

studentJson ="""{
   "id": 1,
   "name": "john wick",
   "class": null,
   "percentage": 75,
   "email": "[email protected]"
}"""
student = json.loads(studentJson)
if not (student.get('email') is None):
     print("value is present for given JSON key")
     print(student.get('email'))
else:
    print("value is not present for given JSON key")
Posted by: Guest on August-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language