title: How to add subcollection to a document in Firebase Cloud Firestore
body: <p>The documentation does not have any examples on how to add a subcollection to a document. I know how to add document to a collection and how to add data to a document, but how do I add a collection (subcollection) to a document?</p>
  
  <p>Shouldn't there be some method like this:</p>
  
  <pre><code>dbRef.document("example").addCollection("subCollection")
  </code></pre>