db.export_without__id.insert({a:1})
db.export_without__id.insert({a:2})
db.export_without__id.insert({a:3, something_id: 'name'})
db.export_without__id.find().pretty()
{
"_id": ObjectId("606ee1c03557e533795e426f"),
"a": 1
}
{
"_id": ObjectId("606ee1c23557e533795e4270"),
"a": 2
}
{
"_id": ObjectId("606ee1d93557e533795e4271"),
"a": 3,
"something_id": "name"
}
mongoexport --db test --collection export_without__id | sed '/"_id":/s/"_id":[^,]*,//'
2021-04-08T12:02:25.377+0100 connected to: mongodb://localhost/
2021-04-08T12:02:25.379+0100 exported 3 records
{"a":1.0}
{"a":2.0}
{"a":3.0,"something_id":"name"}
Still there ^