Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

115
Views
Render nested object using Flatlist

Thank you for your time, i understand this question being ask couple of times in stackoverflow, but i tried none of the method works for my data structure.

My object of arrays stored in the state is as below

[
   {
      "ff07748b-0750-4508-95c9-5c8a4f06be06":{
         "number":[
            "211"
         ],
         "id":[
            "ff07748b-0750-4508-95c9-5c8a4f06be06"
         ],
         "exercise":[
            "Bench"
         ]
      },
      "8f4de6af-4d43-481f-a326-68083f52e066":{
         "number":[
            "21"
         ],
         "id":[
            "8f4de6af-4d43-481f-a326-68083f52e066"
         ],
         "exercise":[
            "Bench"
         ]
      },

      "key":"9|9|2021"
   }
]

Here's how i push it in after calling from firebase snapshot.

            querySnapshot.forEach(documentSnapshot => { 
                if(documentSnapshot.id == "9|9|2021"){
                    console.log(documentSnapshot);
                    users.push({
                        ...documentSnapshot.data(),
                        key: documentSnapshot.id,
                    });
                }
            });

Here's how i render it.

        <View>
            <FlatList
                data={users}
                renderItem={({item,index}) =>(
                    <View>
                        <Text>{item.key}</Text>
                    </View>
                    
                )}
            />  
        </View>

Wanted it to go inside and render the number,exercise.

Item.key contains the current date etc '9|9|2021' and render it out with no issues. On firebase i stored my data by "useremail" -> "today date" -> "list of stuff"

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!