Hello Everyone,
Would any of you kindly assist with the following issue below:
I have:
var AssessmentQuestionObject = [
{
AssessmentID: '1',
Title: 'Question title',
corectOption1: 'Corect Option 1',
correctOptionNo2: 'Correct Option 2',
option1: 'Option 1',
optionNo4: 'Option 2',
optionNo5: 'Option 3'
},
];
I would like to create the object below using a function or any other mean necessary
var Question = [
{ Title: 'Question Title'
,assessmentId: '1'
,options:[
{answer: 'Option 1', IsCorrect: false},
{answer: 'Option 1', IsCorrect: false},
{answer: 'Option 1', IsCorrect: false}
]
,correctoptions:[
{answer: 'Correct Option 1', IsCorrect: true},
{answer: 'Correct Option 1', IsCorrect: true}
]
}
];