# Convert JSON data Into a Custom Python Object # importing the moduleimport jsonfrom collections import namedtuple  # creating the datadata = '{"name" : "Geek", "id" : 1, "location" : "Mumbai"}'  # making the objectx = json.loads(data, object_hook =               lambda d : namedtuple('X', d.keys())               (*d.values()))  # accessing the JSON data as an objectprint(x.name, x.id, x.location)