title: Mongodb: Sort a list by key and value
body: <p>I have a record fetched that I want to sort before sending to frontend.</p>
  
  <pre><code>db.getCollection('users').find({$or:
                      [
                         {createdBy: 'abhi'},
                         {createdBy: {'$ne': 'abhi'}, visibility: 'public'}
                      ]}).sort({'createdBy': 1})
  </code></pre>
  
  <p>I want to sort all the records for <strong>createdBy</strong> user <strong>abhi</strong> first and then the other users. </p>
  
  <p><strong>Something like:</strong></p>
  
  <pre><code>.sort({'createdBy == abhi': 1})
  </code></pre>