title: Find difference between 2 documents on mongoDB from the mongo shell
body: <p>I'm using mongodb 2.4.4 and I want to compare 2 documents, then print their differences only using the mongo shell. Is there a way to compare them? Something like:</p>
  
  <pre><code>db.collection.compare({first_doc: objectID("blablalba"), sec_doc: objectID("blalba2")})
  </code></pre>
  
  <p>and the output would be something like</p>
  
  <pre><code>{diff1:{latitude:{first_doc:10.000, sec_doc:20.000}},diff2:{}}
  </code></pre>
  
  <p>where latitude is the name of the field that had a difference.</p>
  
  <p>The output doesn't need to be exactly like that, but give the same functionality.
  Thanks</p>