Closed simon-p-r closed 8 years ago
Hi @simon-p-r and thanks for the kind words!
Just to make sure I get what you are talking about; projection right?
>db.mycol.find({},{"title":1,_id:0})
{"title":"MongoDB Overview"}
{"title":"NoSQL Overview"}
{"title":"Tutorials Point Overview"}
I am not entirely convinced this is something the mongo-querystring
library should do. In any case, this is how I would suggest this feature could look like on the URL query parameter:
?fields=field1&fields=field2&fields=!field3
This should evaluate to the following projection:
{
"field1": 1,
"field2": 1,
"field3": 0
}
Firstly thanks for this great library!
However the only operators I think are missing are the ability to control was it returned, I use the syntax "not" to exclude or "return" to include what fields are returned within document from mongo,