I'm trying to get firestore collections based on an array list.
I need to get collection 'items' based on the array 'favourites' inside collection 'users'.
Below are the two images of my database.

I'm trying to get firestore collections based on an array list.
I need to get collection 'items' based on the array 'favourites' inside collection 'users'.
Below are the two images of my database.

You can do the following:
onPressed(){
Firestore.instance.collection("users").getDocuments().then((querySnapshot){
querySnapshot.documents.forEach((element){
List value = element.data["favourites"];
Firestore.instance.collection("items").document(value[0]).get().then((value){
print(value.data);
});
});
});
}
Query the collection users -> get the array favourites -> use the value inside the array in the document() method.