I am trying to read mapped data from Firestore. I am reading data but I do not know how to reach one of the keys in the map.
dbSaveAvailableTimes.addSnapshotListener { snapshot, e -> if (snapshot != null && snapshot.exists()) { val chaplainAvailableTimes = snapshot.data if (chaplainAvailableTimes != null) { Log.d("chaplainAvailableTimes", chaplainAvailableTimes.toString()) } I read the data here.
D/chaplainAvailableTimes: {1637868400000={patientUid=null, isBooked=false, time=1637868400000}, 1637863200000={patientUid=null, isBooked=false, time=1637863200000}}
I get results like this in the log.
when I try the chaplainAvailableTimes["time"], I get null.
So, how can I take the time key data after that? I am not familiar with the map in Kotlin. thanks for your help in advance?
times as there are many of them OR just the first one?