Relative Content

Tag Archive for androidfirebasekotlingoogle-cloud-firestore

How to fetch array data stored in another collection in Firestore in Android (Kotlin)?

I have the data structure as shown in the images below. I have a manager logged in via Firebase Auth. Their data is stored in Firestore specific to their UID. Each manager is able to add multiple turfs & their each turf’s UID is stored in turfs_owned as an array.
All the turfs created are stored in turfs collection with their respective UID and a field designating which manager created that turf by defining the manager’s UID in the manager_id field.
I want to fetch the details of each turf created by the manager who is currently logged in.
*I am developing an Android app using Kotlin.
manager collection
turf one created by the manager
turf two created by the manager