Document.prototype.id

Type:
  • «property»

The string version of this documents _id.

Note:

This getter exists on all documents by default. The getter can be disabled by setting the id option of its Schema to false at construction time.

  1. new Schema({ name: String }, { id: false });