I am struggling to create a JavaScript function that can update the "checked" value within an object in an array structured as follows:
array:[
{ id:1,
name:"foo",
options: [
{id:"one", checked: false},
{id:"two", checked: true}
]
},
{ id:2,
name:"faa",
options: [
{id:"one", checked: false},
{id:"two", checked: true}
]
}
]
I have experience with updating the values in an array of objects, but I'm unsure how to approach this specific structure. Any advice or suggestions would be greatly appreciated.
Please note the typo correction in the array format.