Aggregate multiple arrays into one huge array with MongoDB
问题 I got a collection with documents such as those: { "_id": 0, "pictures": [ { "path": "/path/to/first/picture.jpg", "web": "true" }, { "path": "/path/to/second/picture.jpg", "web": "true", } ], "logos": [ { "path": "/path/to/first/logo.jpg", "web": "true" }, { "path": "/path/to/second/logo.jpg", "web": "false", } ] } { "_id": 1, "pictures": [ { "path": "/a/bit/weird/path/to/picture.jpg", "web": "false" }, { "path": "/another/weird/path/to/picture.jpg", "web": "false", } ], "logos": [ { "path":