MongoDB Aggregation Framework - $limit stage

💛$limit stage:

The $limit stage is used to limit the number of input documents or output documents from the stage.

💦 Syntax:

{$limit: "number"}

💧 Example:

db.getCollection("persons").aggregate([{$limit: 3}]);

Post a Comment

Previous Post Next Post