sample data:
[{"title": "foo", "imageData": "xyz123"}, {"title": "bar", "imageData": "abc123"}, {"title": "baz", "imageData": "def456"}]
this will delete the unwanted key in place, with del, taken from here
import json
with open('data.json') as json_data:
data = json.load(json_data)
for element in data:
del element['imageData']
what is the inverse of this command del element['imageData']. So i want to delete everything but the imageData key.