The MongoDB Shell (mongosh) collapses nested documents/arrays from a certain nesting depth by default. This makes viewing a document in its entirety impossible. Is there any way to uncollapse these without using an elaborate aggregation/projection?
For example:
DOCDB PROD>db.test.find()
[
{
_id: ObjectId("62330fc76bbaaf29df9ca461"),
one: {
two: { three: { four: { foo: 'bar' } } }
}
},
{
_id: ObjectId("62330fd76bbaaf29df9ca462"),
one: {
two: {
three: { four: { five: { foo: 'bar' } } }
}
}
},
{
_id: ObjectId("62330fe96bbaaf29df9ca463"),
one: {
two: {
three: { four: { five: { six: [Object] } } }
}
}
}
]
The third result has the nested object collapsed to [Object] instead of printing {foo:'bar'}