Answers for "get collection in ascending order firestore"

1

get collection in ascending order firestore

var db = firebase.firestore();
        db.collection('form')
            .orderBy('id', 'asc') // optional
            .onSnapshot((snapshot) => {
                snapshot.docs.map((doc) => {
                    // console.log(doc.data());
                    let data = doc.data();
}});
Posted by: Guest on October-20-2021
1

firestore order number ascending

firestoreDb.collection("ideas").orderBy("number", Query.Direction.ASCENDING)
Posted by: Guest on January-30-2021
0

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)
Posted by: Guest on March-16-2020

Code answers related to "get collection in ascending order firestore"

Code answers related to "Javascript"

Browse Popular Code Answers by Language