meteor mongo console (working):
db.projects.update({ _id: “uA2HeAZuggESbocxK”}, {$pull: {views: { _id: ‘ufy3XCRQfxarHjbsy’}}})
meteor shell console (not working):
Projects.update({ _id: “uA2HeAZuggESbocxK”}, {$pull: {views: { _id: ‘ufy3XCRQfxarHjbsy’}}})
First one works fine and removes object from array, second one ain’t. Just silently without errors doing nothing.
What I am doing wrong? Is there an alternative to remove object from array in Mongo using Meteor.methods ?