You need to itrate through the dictionary post loading the json and then go through it's items to extract key or value.
Try something like this:
import json
def print_keys(mapping):
[print('key:',k) for k, v in mapping.items()]
return
x = '{ "name":"John Doe", "age":30, "city":"New York"}'
y = json.loads(x)
print_keys(y)