After running $unset on rated field = null, why I am still getting the same count as earlier

I have executed db.movieDetails.updateMany({“rated”: null},{ $unset : {“rated”:""}}) in order to unset all null fields but why still I am getting 1599 count when I am running this command - querydb.movieDetails.updateMany({“rated”: null},{ $unset : {“rated”:""}}).

But Ideally it should give me zero result.

Please check this link

Unset in UpdateMany

Hi @Rashmi_Ranjan_85983,

I hope your doubts are clear after reading the post shared by @Ramachandra_37567.

However, if you still have any doubt then please feel free to get back to us.

Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer

Thanks for the explanation. My doubts are cleared. :slight_smile: