I am getting data like this from my firebase collection:
Object {
"data": Object {
"valuesArray": Array [
"MCU",
"Anime",
"Shopping",
"Travelling",
"Cooking",
],
},
}
I want to store valuesArrayin a bigger state object in react such as this:
const [data, setData] = useState<any>({});
The idea is that I store each data collection in this big state data object. I am finding it hard to reach the valuesArray since the data received has Object, then data, then Object again.
How can I accomplish storing only the valuesArray in the big state object?