How can I flatten a dictionary of dictonaries in Python, and put them into a list? For example, say I have the following dict:
data = { id1 : {x: 1, y: 2, z: 3}, id2 : {x: 4, y: 5, z: 6}}
How do I get:
[{id: id1, x: 1, y: 2, z: 3}, {id: id2, x: 4, y: 5, z: 6}]