I have been struggling for several weeks on how to display data from the Firestore database in a tableview or collection view. When I say I am struggling I mean I am really struggling. I have been working on this for many many hours, trying everything I can find on google.
I can retrieve the data from Firestore into a dictionary [Date: [String: String, String: int]]. But I can’t figure out how to get this information into the cell in the tableview or collection view.
In the cellForItemAtIndexPath function when I try to populate the cell with an item from the dictionary I get:
Cannot subscript a value of type ‘[Date : [String : Any]]’ with an argument of type ‘Int’
Any suggestions would be greatly appreciated!