$pull

The `$pull` operator removes from an existing array all instances of a value or values that match a specified condition.

Syntax

{ $pull: { field: <value|condition> } }

Parameters

fieldstringrequired

The field to update.

<value|condition>stringrequired

The value to remove or a condition that specifies which elements to remove.