import { collection, doc, documentId, query, where, getDocs } from "firebase/firestore";const db = ... // firestoreconst blogIds = ['blog-id-01', 'blog-id-02', 'blog-id-03']// const refs = blogIds.map(id => doc(collection(db, 'blog'), id))const snap = await getDocs(query(collection(db, 'blog'), where(documentId(), "in", blogIds)))const blogs = snap.docs.map(doc => { const item = doc.data() item.id = doc.id return item})
NOTE: In array query allowed max of 10 items