title: Sort/filter by date and department
body: <p>I am new to react-native. Basically, I have created a website which I store my <strong>notification/annoucment</strong> post by each department.</p>
  
  <p>My API: <code>localhost:8000/api/notifications</code></p>
  
  <p>which give me the below result. I can display this into flatlist but how do I <code>sort/filter</code> this data so that when I click the button Date:olderst or department: FGO using picker or button and view into the new screen or same screen.</p>
  
  <p>Do I have to create new API that can filter all those</p>
  
  <pre><code>[
      {
          "id": 9,
          "title": "UTAR FIRST NOTIFICATION USING VOYAGER PLUGIN",
          "description": "&lt;p&gt;THIS IS TO TEST IF THIS WORKED IF I ADD PLUGIN&lt;/p&gt;",
          "image": "[\"notifications\\\\July2019\\\\CJXexAyUxJEe053uVSqk.png\",\"notifications\\\\July2019\\\\8BED9ewaEH1EHqC4hh3T.jpg\"]",
          "attachment": "[{\"download_link\":\"notifications\\\\July2019\\\\3c8wC2IxHz19cH2oTKUA.docx\",\"original_name\":\"Persona.docx\"},{\"download_link\":\"notifications\\\\July2019\\\\tvZdM6rSsmMn35mTTK5W.docx\",\"original_name\":\"proof.docx\"}]",
          "department": "FGO",
          "link": null,
          "created_at": "2019-07-18 10:11:00",
          "updated_at": "2019-07-18 10:17:27",
          "deleted_at": null
      },
      {
          "id": 11,
          "title": "WELCOME TO FIRST FYP PROJECT",
          "description": "&lt;p&gt;THIS IS MY FYP PRO&lt;/p&gt;",
          "image": null,
          "attachment": "[]",
          "department": "DCI",
          "link": null,
          "created_at": "2019-07-19 06:21:39",
          "updated_at": "2019-07-19 06:21:39",
          "deleted_at": null
      }
  ]
  </code></pre>