let childRef = ref.child("Order")
childRef.observeEventType(.Value, withBlock: {(snapshot : FIRDataSnapshot) in
self.count = snapshot.childrenCount
self.something = snapshot.value as! NSDictionary
self.keys = self.something.allKeys as! [String]
print(self.keys)
self.ordersTable.reloadData()
})
Here, I'm able to retrieve all the data under "Order". But I'm getting the older data first and latest data in the last. But I want the newly added data first. Could anyone please let me know how to do it? My structured data is shown below. Under every childByAutoID(-KLIXR0Al_vJKixcuG7K) I have around 10 more child.