I have data that looks like this [[{'title': 'Line'}], [{'title': 'asd'}]]. I want to add a new key and value for every list inside of lists.
I have tried this but I'm having an error 'list' object is not a mapping. Any suggestion?
data = [[{'title': 'Line'}], [{'title': 'asd'}]]
titleID = [{'id': 373}, {'id': 374}]
combine = [{**dict_1, **dict_2}
for dict_1, dict_2 in zip(char_id, data )]
the output I want is like this:
[[{'id': 373, 'title': 'Line'}], [{'id': 374, 'title': 'asd'}]]