I have a list of dicts that are JSON objects, like this: [{'addressId': 12345, 'city': 'London', 'country': 'UK'}, {'addressId': 67890, 'city': 'Berlin'} For some of the entries there are some JSON keys missing (not just the values) - in the example above the second address is missing the country. This causes problems down the line when I want to write this data to MySQL. So I think what I want to do is add the missing keys with empty values. I'm wondering (a) if this is the right approach, and (b) how I would go about doing that. FWIW, we're talking about a few million rows. Any hints are greatly appreciated. Continue reading...