Extract only one answer from each repeating group

image

I’m creating a quiz app and fetching the QnA from GPT4. I’m saving the selected radio button into a custom state. But when the user changes his option from the same set of options from a question, the custom state is storing multiple values from the same question which would not be suited to grade the quiz.

image
image
I only want a single choice from each question.

When you are saving into a custom state, instead of using add item to list, use the set list option. Or, before you add the item to the list, remove the previous item from the list in the custom state.

Let me know if this makes sense :slight_smile: