Pull array within array

Viewed 588

Similar to Find document with array that contains a specific value, but i'm trying to pull it.

db.getCollection('users').find({'favorites':{$elemMatch:{0:5719}}}, {"favorites.$": 1})

returns this:

{
    "_id" : "FfEj5chmviLdqWh52",
    "favorites" : [ 
        [ 
            5719, 
            "2016-03-21T17:46:01.441Z", 
            "a"
        ]
    ]
}

even after this returned 1:

Meteor.users.update(this.userId, {$pull: {'favorites':{$elemMatch:{0:movieid}}}})
2 Answers
Related