I have following structure 1 questionnaire got many questionSection 1 questionSection got many questions
i want to get all the questions. I tried following
const allQuestions: Question[] = [];
questionSections.forEach(section => {
section.questions.forEach(question => {
allQuestions.push(question)
});
});
Is there a better way to achieve the same result?
Thanks