title: How to compare 2 mongodb collections?
body: <p>Im trying to 'compare' all documents between 2 collections, which will return true only and if only all documents inside 2 collections are exactly equal.</p>
  <p>I've been searching for the methods on the collection, but couldnt find one that can do this.</p>
  <p>I experimented something like these in the mongo shell, but not working as i expected :</p>
  <pre><code>db.test1 == db.test2
  </code></pre>
  <p>or</p>
  <pre><code>db.test1.to_json() == db.test2.to_json()
  </code></pre>
  <p>Please share your thoughts ! Thank you.</p>