What I had
{
"1zkhj45kjb3h3jj27777fjd": {"-L7hgtdyYUYY56":{ email: "[email protected]",name:"abc" } },
"1zkhj45kjb3h898fj7fjddk": {"-L7hgtdyYUYY56":{ email: "[email protected]",name:"dumy" } }
}
What I've done
const snapshot = snap.val()
const items = Object.values(snapshot)
now items looks like
[
{"-L7hgtdyYUYY56":{ email: "[email protected]",name:"abc" } },
{"-L7hgtdyYUYY56":{ email: "[email protected]",name:"dumy" } }
]
But I want
[
{ email: "[email protected]",name:"abc" } ,
{ email: "[email protected]",name:"dumy" }
]
I have tried all other stretegies like Object.keys, Object.enteries.
if I again call object.values it gives same result.
How to do it javascript ? I'm newbie to react native and javascript.
Thank you!