Mongodb, export collection with all fields without adding manually

452 Views Asked by At

Is there any way in Mongodb, to export collection with all fields without adding manually?

In Compass, when I go to export collection I see an example of the fields to export, example:

enter image description here

But if I check each document by hand, I can see that some objects have different fields inside.

Sure, if I add manually all the fields that I need it will exported correctly, but it's impossible to me to know which fields are in a database with 50M of documents where an external API inserts those objects as they want.

Is there any way?

0

There are 0 best solutions below