My goal is to iterate through questions.questions
, gradually adding on each time like usual. However, it seems that I need to do this inline because I want to utilize the number generated to update item
as the key in the second loop.
<div v-for="question in questions.questions">
{{question.question}}
<div v-if="grouped_answers">
<div v-for="a in grouped_answers[item].answers">
{{a.id}}
</div>
</div>
{{item += 1}}
</div>
The variable item
is already initialized in the data as 0, and everything else works with that value set at 0, but it simply isn't fetching the rest of the data.