title: Firestore, retrieve specific fields as JSON?
body: <p>I'm trying to retrieve specific fields from a given firestore collection (inside of an HTTPSCallable) but I'm getting &quot;nulls&quot; for fields that I know exist and have data. Any ideas what I'm doing wrong?</p>
  <pre><code>var docs;
          await db
            .collection(mycollection)
            .where(&quot;flag&quot;, &quot;==&quot;, &quot;true&quot;)
            .get()
            .then((querySnapshot) =&gt; {
              docs = querySnapshot.docs.map((doc) =&gt; {
                doc.data();
              });
            });
          return JSON.stringify({ mydocs: docs });
  </code></pre>