when I console.log(this.state.animal_names) out my state element I get
>(2) [Array(2), Array(2)]
When I expand that, I get
0: (2) ["dogNames", Array(53)]
1: (2) ["catNames", Array(100)]
However when I try and access those, like so:
desiredAnimal = "dogNames";
this.state.animal_names[desiredAnimal];
I get:
undefined
how do I access these so I can loop through the arrays in each category?