The correct syntax is as follows:
Box.update( {_id: this._id} , {$unset: { deleteresult : "" } } );
You must specify a value for the operation $unset : { deleteresult : "" } . Even if it is empty.
Execute relevant documents :
db.collection.update( { field: value1 }, { $unset: { field1: "" } } );
The above example removes field1 in the collection from documents, where the field has the value value1. The value of the field in the $ unset expression (i.e., "" Above) does not affect the operation.
source share