title: How to make a leaderboard in mongoDB? nodejs
body: <p>Hello actuallly i am tring to make a leaderboard command for my discord bot so wanted to make this</p>
  
  <p><strong>User Shema Example</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>{ _id: something, points: 100 }
  </code></pre>
  
  <p><strong>I have every players in Array example</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>[
  { _id: something, points: 100 },
  { _id: something2, points: 300 },
  { _id: something3, points: 200 },
  { _id: something4, points: 50 }
  ]
  </code></pre>
  
  <p>I wanted to get points by ascending order by points then I want to get the name this is how it want to be like</p>
  
  <pre><code>something4 - 50
  something - 100
  something3 - 200
  something - 300
  </code></pre>