I am trying to build a quiz website using Open Trivia DB API. Example, https://opentdb.com/api.php?amount=10
The URL will give you a set of questions, with the correct and wrong answers for each of them. Before I display the options to the viewers, I need to combine the wrong and correct answers, and shuffle it up. So far, I can display all the options but I don’t think it is the right way to do it. I put two rows in a flex column, and I size one row 75% for wrong answers and the other 25% for right answers. But the right answer will always be the first (or the last, depending on my layout).
So how do I go about with something like that, and displaying the options with Repeater?
Is there a way I can create my own array variable inside the outer repeater, and use that new variable with repeater to display the options?
Checkout my screenshots and example JSON
Last updated: