Reputation: 3390
I'm a mongodb noob trying to learn mongodb...
I'm just tying to understand what this line is saying in english...
{ $project : { _id : { $substr : ["$_id",0,1] } } }
can someone translate?
Upvotes: 0
Views: 80
Reputation: 95315
It says that in the response to a query being projected through this expression, the _id field of each object should be replaced by only the first character of its actual value. It's part of the aggregation framework, documented here.
_id
Upvotes: 1