Having user_id="2", how can I set all these hasSeen:false, except for user_id="2" set with hasSeen:true ?
{
cc: [
{ user_id: "1", hasSeen:true}
,{ user_id: "2", hasSeen:false}
,{ user_id: "3", hasSeen:false}
]
}
I tryed
.update({ $set:{ 'cc.$.hasSeen':false } })
but it doesn't work...