HealthBlock / debugG.py
olusegun
First Commit
e3b9b11
raw
history blame contribute delete
402 Bytes
import re
json_data = {'test1@email.com': {'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])