Actually i am fetching data from an API every thing is working quite well but when i fetch array of array then its giving error of undefined..How should i solve this.Any help will be appreciated..Thanks in advance..
This is the response i am getting from an api..
{data: Array(10), meta: {…}}
data: (10) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
meta: {message: "Rider's list fetched successfully.", page: 1, per_page: 10, total: 134}
__proto__: Object
And i wanted to fetch total from the 'meta'..I have stored response in state called data ..And when i put console.log(this.state.data.meta.total) its giving me error like:-Cannot read property 'total' of undefined