I'm trying to map the text of a database of given asnwers in a List for my quiz App. The problem is that i have to acces the title in an array of array of objects like this: log of the database in console
I tried to map as usual using
console.log(answerQuestionId.map(element => `${element.testo}`));
but it returns an array of udefined. Can anyone help me with that? I want to get an array of arrays with only the text of the answers
I hope you are expecting an array of arrays with only
testodata.Check the code below.
answerQuestionId.map(item => item.map(innerItem => innerItem.testo))