• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to load array data from Firestore?

Resolved: How to load array data from Firestore?

0
By Isaac Tonny on 18/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I don’t know how to load this array field (IllnessHistory), I have searched on google for it, but no one works. Anyone can help me with this? Here is my code and screenshot of my Firestore structure:
enter image description here

Answer:

To get the content of the “IllnessHistory” array as a list of GiveDonor objects, then you should create a new class that contains that specific list like this:
Now to read the data, you can simply use:
I have also written an article on this topic called:
  • How to map an array of objects from Cloud Firestore to a List of objects?

If you have better answer, please add a comment about this, thank you!

android firebase google-cloud-firestore kotlin
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: significance letter above bar graphic in wrong order

01/04/2023

Resolved: VBA – Applying border around the areas with value/text

01/04/2023

Resolved: How can I implement a function depending on picked up items?

01/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.