Firestore(web)
Help me write a request for random documents based on ID
Can I do this without getting the entire collection?
const questions = [];
const docRef = db.collection('ru').doc(category).collection('questions');
try {
const doc = await docRef.get();
doc.forEach((item) => {
questions.push(item.data());
});
} catch (e) {
throw e;
}