在您告訴我閱讀文檔之前,我已經閱讀了。我已經嘗試過那里的例子,但我還沒有讓它工作。我只是想從我的數據庫的靜音部分獲取所有數據,并能夠檢查它們是否仍然靜音。(基本上我需要獲取他們的 UserId、公會 ID、靜音開始和靜音結束數據。)從我試過的文檔中:const mutedDB = db.collection('muted');const queryRef = mutedDB.where('stillMuted', '==', true);console.log(queryRef)^ 回報 ^ 和const mutedDB = db.collection('muted');const snapshot = mutedDB.where('stillMuted', '==', true).get();if (snapshot.empty) return console.log('None') snapshot.forEach(doc => { console.log(doc.id, '=>', doc.data());});^ 返回錯誤 ^我不確定我是否做對了,如果有辦法解決/解決這個問題,請告訴我!
我如何從 firestore 文檔中獲取所有數據?
慕尼黑5688855
2023-03-24 16:59:16