I have one array inside that I have some multiple array inside that I tried to arrange that array inside array but I dont know what is wrong ? so how to set array inside array properly? below arrayData is available.
const arrayData = [
form_id: 1,
countTotal: 100,
formName: 'Application Form',
questions: [
0: [
questionName: 'what is your name ?',
note: 'give firstname middlename and lastname also..',
required: true,
answer: 'my name is John dao',
sequence: 0,
questionType: 'long text',
options: [],
]
1: [
questionName: 'select your gender ?',
note: '',
required: true,
answer: 'Male',
sequence: 1,
questionType: 'Single Selector',
options: [
0: {
option_id: 1,
value: 'Male',
sequence: 0,
is_selected: true,
},
1: {
option_id: 2,
value: 'female',
sequence: 1,
is_selected: false,
},
2: {
option_id: 3,
value: 'Other',
sequence: 2,
is_selected: false,
},
],
]
]
]
{}instead of[].{}, it will return as object, not array. See: stackoverflow.com/questions/31299172/…