bestimmtes Produkt zu finden, gibt es in Feuerbasis oder nicht
Hallo ich reagieren + Feuerbasis arbeiten werde.
Können Sie mir bitte sagen .. wie Sie herausfinden, ob bestimmte Element in Firebase vorhanden sind oder nicht.
Gleichwie in gegebenen Bild
wie existieren bestimmtes Produkt zu finden, wo productId „-KY5gzllzbAl1jAACcP“
istNamen bestimmten Tabelle ist „productcoredetails“.
var query = firebase.database().ref('ProductCoreDetails');
query.once("value", function(snapshot) {
console.log('value of snapshot is', snapshot.val().ProductId);
if(snapshot.hasChild(ProductId)){
console.log('PRODUCT EXIST');
}
else{
console.log('Product doesnt exist');
}
});
viele Lösung versucht, aber nichts funktioniert für mich ...