vendredi 26 juin 2020

Query to iterate over array of maps in Firestore (web)

I'm using Firestore in my React Native project, and I want to get X document in real time by using .where(), the think is that the field that I'm looking for is inside an array of maps, how can I perform a query to get the document based on the field "r_user_uid"

something like:

const db = firebase.firestore();
db.collection("f_invitations").where("invitations.r_user_uid", "==", 12) 
                              .onSnapshot((querySnapshot) => {...}

enter image description here




Aucun commentaire:

Enregistrer un commentaire