title: Cloud Firestore collections queries not working
body: <p>As Cloud Firestore is new, I am having problems using it. </p>
  
  <p>I have to get <strong>Collection</strong> of all <strong>users</strong> and traverse it. But it is not working. </p>
  
  <pre><code>db.collection("users").get().then(function(querySnapshot){
        console.log(querySnapshot.data());
  });
  </code></pre>
  
  <p>It says:</p>
  
  <blockquote>
    <p>querySnapshot.data is not a function</p>
  </blockquote>
  
  <p>And following code:</p>
  
  <pre><code>callFireBase(mobileToCheck){
          db.collection("users").where("mobile_no", '==', mobileToCheck).get().then(function(querySnapshot){
              if (querySnapshot.exists) {
                  var userData = querySnapshot.data();
                  var userId = querySnapshot.id;
                  console.log(mobileToCheck + "Exist In DB");
              }else{
                  console.log(mobileToCheck + "Do Not Exist In DB");
              }
          });
  }
  </code></pre>
  
  <p>Is always printing </p>
  
  <blockquote>
    <p>923052273575 Do Not Exist In DB</p>
  </blockquote>
  
  <p>Even if it exists, See following image for reference. </p>
  
  <p><a href="https://i.stack.imgur.com/YyUEw.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YyUEw.png" alt="enter image description here"></a> </p>