Difference between _id: null and _id: 0?

What’s the difference between _id: null and _id: 0?
One is used during the $match stage and the other $project?

As I know
In $match it used to filter the document (where you find it? I didn’t see on the lectures). Or do you mean on the $group : Chapter 3: The $group stage minutes 5:20? its used for _id, because _id should be present (required) on the $group stage, you can change it to null or 0 or whatever you want.

On $project, its used for shows or hide the field (0 = hide, 1 = show)


1 Like

Thanks. I was confused because _id is primary and automatically assigned to every document. Therefore, it shouldn’t be null.