Given a given Firestore path what\'s the easiest and most elegant way to check if that record exists or not short of creating a document observable and subscribing to it?
If for whatever reason you wanted to use an observable and rxjs in angular instead of a promise:
this.afs.doc('cities', "SF") .valueChanges() .pipe( take(1), tap((doc: any) => { if (doc) { console.log("exists"); return; } console.log("nope") }));