0
我想通过一个属性,使用此代码搜索对象:搜索对象的火力地堡
ref.orderByChild("aFieldNameOnTheFirebaseCollection").equalTo(mySearchArgument).limitToFirst(1).on("child_added", function(snapshot) {
console.log("Yes the object with the key exists !");
var thisVerificationVarisSetToTrueIndicatingThatTheObjectExists = true ;
});
如果一个或多个对象的集合中没有找到这一工程确定。但是,我需要知道是否没有对象存在。在验证之前,我可以将验证变量设置为false,但验证过程是异步的,我需要等待完成。我使用承诺?
完美。非常感谢你 ! – GCoe