Reputation: 4380
I'm trying to get firestore data ordered by progress[0].score.
I could not figure out how I can pass this info to orderBy method of collection.
Upvotes: 1
Views: 48
Reputation: 4148
this kind of feature isn't available to the Firebase console, it is merely rendering your data in a generic format that favors alphanumeric sorting. any filters you apply in the Firebase web console does not affect how it is received within your clients app and would require additional sorting.
for example:
const list = snapshot.data().progress.sort((a,b)=> a.level - b.level)
Upvotes: 1