I have the following model and I'm trying to update the 'seen' property to true for all of the objects in the notifications array, but I can't figure out a way to do this using one query?
{
_id: 'fjkldjasfljsdklfj',
user_id: 'fjdskjafkldsjadf',
notifications: [
{
seen: false,
message: 'This is message 1',
date: '12-03-2021'
},
{
seen: false,
message: 'This is message 2',
date: '12-03-2021'
},
{
seen: true,
message: 'This is message 3',
date: '12-03-2021'
},
{
seen: false,
message: 'This is message 4',
date: '12-03-2021'
},
]
}