project (
, [ | Object query ]
) {

Generate a document with another document using a MongoDB projection specification.

Arguments

| Object document

The source document to project.

optional
| Object query

If the projection uses the positional operator, provide a query to define it.

| Object projection

The projection specification used to generate a new document.