Sending Questions list with Ion-toggle values

Hi All

I am testing Ionic 5 to use to build a side project.

I have a section where I ask users 7 questions and two of those have input fields while the other 5 require a yes or no answer.

So the questions with toggle must default to false(No) on page load then as user changes the selection then those be sent when user submits the form after answering all 7 questions.

I want to save the first 5 questions as an object and the other two are fine.

So I want to have something like this. screening data will be the combined 5 questions into one object with question id, description and toggle value (yes/no)

"company_id" : 39,
"screening_data": [
    {"id": 1 , "description": "description goes here 1", "answer" : "yes"},
    {"id": 2 , "description": "description goes here 2", "answer" : "no"},
    {"id": 3 , "description": "description goes here 3", "answer" : "yes"},
    {"id": 4 , "description": "description goes here 4", "answer" : "no"},
    {"id": 5 , "description": "description goes here 5", "answer" : "yes"}

One Submission I will be sending to backend via api.

I would like your assistance with this.


Ordinarily volunteer support forums help people with specific problems in code that they are writing. If you are looking for somebody to write your app for you, you could always shift your topic to the “jobs” subcategory.


I am writing the code and was asking for assistance with a solution not looking to hire someone.

Sorry If my wording was incorrect