title: Get Firestore document as plain Javascript object?
body: <p>I'm currently manually itearting over document fields in firestore and putting them into an object which I stringify to JSON.</p>
  
  <p>Is there a way to automate the process? Something like:</p>
  
  <pre><code>var userEnrollments = ToJson(await admin.firestore().collection(USERS + "/" + x.uid + "/" + ENROLMENT));
  </code></pre>