title: Query a document value in a nested collection in firebase
body: <p>I need to get the values from a document with this schema in Firebase:</p>
  <pre><code>COLLECTION =&gt; DOCUMENT =&gt; COLLECTION =&gt; DOCUMENT 
  userPolls  =&gt; userId   =&gt; dailyPolls =&gt; 20200825 =&gt; pollDate: &quot;2020/08/25&quot;
                                                      status:   &quot;Under PUM&quot;
                                                      statusCode: &quot;pum&quot;
                                                      uid: &quot;zwQnrrBdNCemWyXEW2LHmw8LejA2&quot;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/vAo2E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vAo2E.png" alt="enter image description here" /></a></p>
  <p>This is my attempt at it. But I think I am getting it wrong in flutter</p>
  <pre><code>final CollectionReference userPollCollection =
        Firestore.instance.collection('userPolls');
  Future getPoll() async {
      final DateTime now = DateTime.now();
      final DateFormat formatter = DateFormat('yyyy/MM/dd');
      final String formatted = formatter.format(now);
      var pollDate = formatted;
      
      var docRef = await applicationUser
          .document(userId)
          .collection('dailyPolls')
          .document(pollDate);
      docRef.get().then((onValue) =&gt; {print(onValue.data['status'])});
    }
  </code></pre>
  <p>I know that this is not right. Can you please show me how? Thank you.</p>
  <p><strong>EDIT</strong>
  For reference, this is how I ADD data to the firestore db:</p>
  <pre><code>Future setPoll(UserPoll userPoll) async {
      var dt = userPoll.pollDate.replaceAll('/', '');
      return await userPollCollection
          .document(userId)
          .collection('daillyPolls')
          .document(dt)
          .setData({
        'uid': userId,
        'pollDate': userPoll.pollDate,
        'status': userPoll.status,
        'statusCode': userPoll.statusCode
      });
    }
  </code></pre>
  <p>This is how I try to get it</p>
  <pre><code>Future getPoll() async {
      final DateTime now = DateTime.now();
      final DateFormat formatter = DateFormat('yyyy/MM/dd');
      final String formatted = formatter.format(now);
      var pollDate = formatted;
      var dt = pollDate.replaceAll('/', '');
  
      var docRef = userPollCollection
          .document(userId)
          .collection('dailyPolls')
          .document(dt);
  
      docRef.get().then((onValue) {
        print(onValue.data);
      });
    }
  }
  </code></pre>
  <p>If I use this code based on the help of Peter Haddad, I get a null value when printing my <code>result.data</code></p>