I have a data structure as below with nested arrays. I'm trying to find the simplest way to find the calendar with id: 3 and then add a property show: false to that calendar. Either using vanilla javascript (preferable) or lodash.
accounts: [
{
name: "account1",
calendars: [
{
id: 1,
name: "calendar1account1"
},
{
id: 2,
name: "calendar2account1"
}
]
},
{
name: "account2",
calendars: [
{
id: 3,
name: "calendar1account2"
},
{
id: 4,
name: "calendar2account2"
}
]
}
]