HealthBlock / debugG.py
olusegun
First Commit
e3b9b11
raw
history blame
402 Bytes
import re
json_data = {'[email protected]': {'age': 18, 'gender': 'Female', 'hospital': '', 'name': 'tesuser1', 'number': 41414, 'v1': False, 'v1Date': 0,'v2': False, 'v2Date': 0}}
# Extract email address from dictionary key
email = next(iter(json_data))
email_address = re.match(r"[^@]+@[^@]+\.[^@]+", email).group(0)
#print(email_address)
#print (json_data.keys())
print(list(json_data.keys())[0])