score:2

Accepted answer
const answerArr = Object.values(questionData).reduce((acc, questionValue) => {
        acc.push(questionValue)
        return acc;
      }, []);
      setAnswers(answerArr)

score:1

const answerArray = []
Object.keys(questionData).forEach(key => {
    console.log(key, questionData[key]);
    answerArray.push(questionData[key]);    
  });
setAnswers(answerArray)

Related Query

More Query from same tag