What is a pythonic way to remap each dictionary key in a list of identically-keyed dictionaries to different key names? E.g.,
[{'type_id': 6, 'type_name': 'Type 1'}, {'type_id': 12, 'type_name': 'Type 2'}]
must transform into
[{'type': 6, 'name': 'Type 1'}, {'type': 12, 'name': 'Type 2'}]
(I need to do the transformation in order to match an output specification for an API I’m working on.)
just use a list comprehension