title: Mongo shell: how to display document's fields in lexicographic order?
body: <p>This is what I get now:</p>
  
  <pre><code>&gt; db.collection_name.findOne()
  {
      "_id" : ObjectId("whatever")
      "c" : "a value"
      "a" : "a value"
      "b" : "a value"
  }
  </code></pre>
  
  <p>Is there any function that I could use so that I can see the document's fields in lexicographic order (on a find() or findOne())? I would like to see:</p>
  
  <pre><code>&gt; db.collection_name.findOne().something()
  {
      "_id" : ObjectId("whatever")
      "a" : "a value"
      "b" : "a value"
      "c" : "a value"
  }
  </code></pre>