title: Sort the array inside object mongodb laravel
body: <p>I have this object and i want to sort the Demo2 by it created_at.
   I am using mongodb as db laravel php </p>
  
  <pre><code>Demo": {
      "Demo2": [
      { 
      "type": "review",       
      "created_at": "1970-01-01 05:30:00"
      },
      {
      "type": "store",        
      "created_at": "2019-04-16 6:22:30"
      },
      {
      "type": "postw",        
      "created_at": "2019-04-16 16:23:10"
     }
  
    ],
  
  }
  </code></pre>
  
  <p>How can i achive this throught laravel mongodb query.</p>