title: Cannot get all the document inside sub collection inside firestore
body: <p>I have a collection name items, with document named after the uid and inside it there is another collection post which have autogenerated document and data. I am trying to query and get all the collection inside post.</p>
  <pre><code>&lt;pre&gt;
  
      &lt;script&gt;
        function show_items(){
         var u_id;
          firebase.auth().onAuthStateChanged(function(user) {
        if (user) {
          u_id=user.uid;
          console.log(u_id);
        } else {
          return;
        }
      });
          var outputlist=[];
          var dbs=firebase.firestore();
          dbs.collection('items').doc(u_id).collection('post').get().
          then(querySnapshot =&gt; {
            console.log(querySnapshot.size);
           if (querySnapshot.empty) {
             console.log('No matching documents.');
           }
            querySnapshot.forEach(doc =&gt; {
              console.log(doc.id, '=&gt;',doc.data());
              outputList.push(doc.data());
            });
          })
            .catch(err =&gt; {
            console.log('Error getting documents', err);
          });
        }
      &lt;/script&gt;
  
  &lt;/pre&gt;
  </code></pre>
  <p>Firestore rules:
  <img src="https://i.stack.imgur.com/XunxL.png" alt="Firestore rules" /></p>