I have a problem that I'll share with you to see if you can help me, this is a simplified example of what I need to do:
const [array, setArray] = [
{
name: "John",
family: [
{
name: "Britney",
isOld: false, // CHECKBOXES
},
{
name: "Patrick",
isOld: false, // CHECKBOXES
},
{
name: "Jenifer",
isOld: false, // CHECKBOXES
},
],
},
{
/*other users...*/
},
];
I have a setup similar to this, and I need to be able to set isOld to true or false with checkboxes to the correct user, but I don't know how to set that state correctly. For example if a click on britney's checkbox isOld should change to true in the state even is there are more main users in this case i'm only showind one "John".
BTW I'm mapping over the main array and then over the family members too, in order to get a table with all the info about the users and checkboxes.