title: How to handle for promise inside a piped map
body: <p>I am definitely sure I am confused here so please any help is appreciated. </p>
  
  <p>Here is my scenario: </p>
  
  <p>I pull from Firestore a document: </p>
  
  <pre><code>return this.afs.collection("events").doc(eventID).snapshotChanges().pipe(
        map( document =&gt; {
  
        })
      );
  </code></pre>
  
  <p>All is fine up to here. </p>
  
  <p>But inside the map I need a promise to resolve (or not) </p>
  
  <p>For example: </p>
  
  <pre><code>return this.afs.collection("events").doc(eventID).snapshotChanges().pipe(
        map( document =&gt; {
          // This is a promise the below part 
          const data = await EventImporterJSON.getFromJSON(document.payload.data())
          return data
        })
      );
  </code></pre>
  
  <p>I understand that the <code>await</code> cannot happen there. I am very confused how to solve this, perhaps I have not worked long enough with observables and rxjs. </p>
  
  <p>In the end what I am trying to achieve is: </p>
  
  <p>Get the document. Map and process it but inside the process, I need to handle a promise. </p>
  
  <p>I don't want to return that promise to the caller though. </p>
  
  <p>Does this make sense? </p>
  
  <p>Or have I structured this completely wrong? </p>