You'll often times need to get specific information from the database. This video will introduce you to query methods.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4203-beginning-firebase/lessons/11
You'll often times need to get specific information from the database. This video will introduce you to query methods.
If I wanted all the false results to be returned first how would I do that? More specifically, how would I return the inverse of the list?
I don’t believe Firebase provides a way for you to specify that a query sorts data in descending order. So you’d have to do the sorting in descending order at the client end once you’ve gotten the results of the query from Friebase.
Basically, create the array of new items based on the call to queryOrdered
as you would normally and then reverse the array by using an array method such as reversed
or sort
to get the order that you want before assigning the data to self.items
.
This topic was automatically closed after 166 days. New replies are no longer allowed.