Am using it with nodejs in my backend. Got the following query:
db.conversations.update(
{ convoId: convoId },
{ $set: { "ids.$[elem].read" : true } },
{ arrayFilters: [ { "elem.id": userId } ] }, (err, data) => {
if(err) {
res.send(err);
}
console.log(data);
res.json(data);
});
Now in the frontend i get the error back, when the query is finished:
"No array filter found for identifier 'elem' in path 'ids.$[elem].read'"
I read, that array filters don't work if the mongodb version is below 3.6, so i updated that but it still gives me the same error.
Anyone got an idea what i'm doing wrong?