I want to move through the contents of a JSON file with buttons.
This is the basic structure of my JSON:
[
{
"page": "1",
"required": "true",
"question": "lorem ipsum",
},
{
"page": "2",
"required": "true",
"question": "lorem ipsum dolor",
}
]
I'm building a multi-step form and I want to get the questions from this JSON. Is there any way for me to have a Next button, that moves one index forward in the JSON file, and displays the info in that index? The page identifier is unique to every object.
I'm new to React, so any explanations will be appreciated!