title: MongoDB shell collapses nested documents/arrays
body: <p>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?</p>
  <p>For example:</p>
  <pre><code>DOCDB PROD&gt;db.test.find()
  [
    {
      _id: ObjectId(&quot;62330fc76bbaaf29df9ca461&quot;),
      one: {
        two: { three: { four: { foo: 'bar' } } }
      }
    },
    {
      _id: ObjectId(&quot;62330fd76bbaaf29df9ca462&quot;),
      one: {
        two: {
          three: { four: { five: { foo: 'bar' } } }
        }
      }
    },
    {
      _id: ObjectId(&quot;62330fe96bbaaf29df9ca463&quot;),
      one: {
        two: {
          three: { four: { five: { six: [Object] } } }
        }
      }
    }
  ]
  </code></pre>
  <p>The third result has the nested object collapsed to [Object] instead of printing {foo:'bar'}</p>