Firestore Group by field

前端 未结 3 1495
甜味超标
甜味超标 2021-01-25 23:19

Below is my firestore collection structure

My vue method to get data

fetchResults(){
  db.collection(\'data\').onSnapshot((querySnapShot)=>{
         


        
3条回答
  •  执念已碎
    2021-01-26 00:10

    You can do using

    fetchResults(){
      db.collection('data')
     .orderBy("id", "asc")
     .onSnapshot((querySnapShot)=>{
         // Do something
      })
    }
    

    More information visit https://firebase.google.com/docs/firestore/query-data/order-limit-data and you can also apply filter using click on click on filter icon

提交回复
热议问题