I’m trying to figure out how to write an aggregation stage to remove documents that begin with a certain string but I’m having trouble wrapping my head around what to nest where.
I think I need $ne and maybe $substrCP (although there are a ton of string operators)
pseudo code:
const stageOne = { title: { $ne: { $substrCP: [ "ABC #", 0, 1, 2, 3, 4 ] } } };
// or... please help
Meteor.startup(function(){
MyCollection.aggregate( [
{ $match: stageOne },
{ $out : "NewCollection" }
]);