collection.findOne

Anywhere

collection.findOne([selector], [options])

Finds the first document that matches the selector, as ordered by sort and skip options.

Arguments

selector Mongo Selector, Object ID, or String

A query describing the documents to find

Options

sort Mongo Sort Specifier

Sort order (default: natural order)

skip Number

Number of results to skip at the beginning

fields Mongo Field Specifier

Dictionary of fields to return or exclude.

reactive Boolean

(Client only) Default true; pass false to disable reactivity

transform Function

Overrides transform on the Collection for this cursor. Pass null to disable transformation.

doc_Meteor
2016-05-29 17:18:08
Comments
Leave a Comment

Please login to continue.