My response from faunadb database to the frontend react looks similar to this but i dont know how to reach to the data object which is containing (letter and extra) keys. I have used map function in my frontend as well but it didn't work.
{
"data": [
{
"ref": Ref(Collection("Letters"), "101"),
"ts": 1565299176485000,
"data": {
"letter": "A",
"extra": "First"
}
},
{
"ref": Ref(Collection("Letters"), "102"),
"ts": 1565299176485000,
"data": {
"letter": "B",
"extra": "second"
}
}
]
}
response.data[i].data
Where i is the index of the array you wish to reach.
Or:
response.data.map(o => console.log(o.data))
This will log the contents of the data object nested in the array that is nested within the outer data object.