Notice: session_start(): A session had already been started - ignoring in /home/u614325693/domains/onedoubt.com/public_html/post.php on line 3
$limit - ONEDOUBT.COM

 

Aggregation $limit

This aggregation stage limits the number of documents passed to the next stage.

Example

In this example, we are using the "sample_mflix" database loaded from our sample data in the section.

db.movies.aggregate([ { $limit: 1 } ])

This will return the 1 movie from the collection.


 
$limit

Login
ADS CODE