How to flatten a nested object in MongoDB?
I have a document of the form: { "employee_addr": { "city": "London", "street": "Downing Street", "apartment": 10 } "age": 58, "name": "Boris" } I want to flatten the document. That is, removing the employee_addr nested object and moving its properties…