# write json file
import json
d = {
"firstName": "Tom",
"lastName": "Jack",
"gender": "male",
"age": 35,
"address": {
"streetAddress": "126",
"city": "San Jone",
"state": "CA",
"postalCode": "95150"
},
"phoneNumbers": [
{ "type": "home", "number": "4083627627" }
]
}
filename = "/content/sample_data/sample1.json"
with open(filename, 'w') as f:
json.dump(d, f)