I am working on a smart contract for a quiz application, Basically, I want everyone to be able to create a quiz and for everyone to be able to answer. I am struggling on saving a list of quizzes with the following structs
struct Option {
string option;
}
struct Question {
string question;
string answer;
Option[] options;
}
struct Quiz {
address author;
string title;
string description;
Question[] questions;
}
Survey[] private surveys;
function createQuiz(string memory _title, string memory _description, string[] _questions, string[][] _options) {}
Basically, I want to store a survey and a list of questions inside that survey. How can I go about doing that?