'How do I list all data in react native firestore? [closed]

I want to see the posts made by all users. so i want to get all data regardless of user id

 function storePostData(){
    
    firebase.firestore().collection('Post')
    .doc(userId)
    .collection('userPost').get()
    .then((querySnapshot)=>{
      querySnapshot.forEach(snapshot=>{
        let data = snapshot.data();
      })
    })
  }

enter image description here

This data structure

---Post -----userId -----userPost -------randomName(Post data)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source