I am working on a complex array in which questions and its related answers are coming from the service. After receiving the array I want to change the attribute 'IsChecked' of the Answers to false. My code for this is
this.questions.forEach( elm => {
elm.Awnsers.forEach( ans => {
ans.IsChekced = false;
});
});
and the output coming is
{Awnser: "Periapical radiograph(s).", IsChecked: true, Qid: 1, IsChekced: false}
As you can see instead of changing the value of IsChecked the code is adding another attribute with the same name. What is wrong am I doing?