I’m working on a function in MongoDB Stitch and I’m having an error when I try to update multiple documents in an array. I’m using an arrayFilter and $ operator.
The error I’m getting is the following:
StitchError: No array filter found for identifier ‘elem’ in path ‘streams.$[elem].pickup_point_id’
$set: {
"streams.$[elem].pickup_point_id": "",
_modified: new Date()
}
},
{
multi: true,
arrayFilters: [ { "elem.pickup_point_id": pickup_point_id } ], //pickup_point_id is sent in arguments and it's working fine for everything else
}
)
Unfortunately arrayFilters is currently not supported. There’s an open canny arrayFilters | Voters | MongoDB for this operator to be added. Please feel free to up-vote to get notifications on request.
Thanks for the answer, is currently unsupported for stitch only? When I was trying this in stitch I also tried it in mongo shell and it worked just fine.