Get Collection only where
getCollectionWhereFirebase
Description: Mengambil koleksi dokumen berdasarkan kondisi tertentu.
Parameters:
collectionName: Nama koleksi Firestore.whereKey: Nama field yang menjadi kriteria pemilihan.operator: Operator perbandingan seperti '==', '>', '<', '>=', '<=', dll.whereValue: Nilai yang digunakan dalam kondisi pemilihan.
Example Call:
const collectionName = 'CollectionName';
const whereKey = 'FieldName';
const operator = '==';
const whereValue = 'Value';
try {
const result = await getCollectionWhereFirebase(collectionName, whereKey, operator, whereValue);
console.log('Filtered Collection:', result);
} catch (error) {
console.log('Error:', error);
}Last updated