how to retrieve documents in certain order from firebase code example
Example: order documents in firestore
// Create Data
const timestamp = firebase.firestore.FieldValue.serverTimestamp;
db.collection('things').add({ ...myData, createdAt: timestamp() })
// Query
db.collection('things').orderBy('createdAt').startAfter(today)