I\'m new using MongoDB, and I don\'t know how to solve the next problem:
I have a collection of documents like this:
{
\"URL\": \"www.stackoverflow.com\
It is possible to suppress keys and array elements in the returned document, but not in the way that you want.
In your example, you can suppress the URL key with the following query, which uses the second argument to find():
db.links.find({"TAGS.NAME" : {$all : ["question","answer"]}}, {"URL" : 0})
However, I don't believe it is possible to suppress individual members of an array on the server-side with find() based on which array members were specified with $all.
You can use $slice to return only certain members of an array, but it is position-based. For example,
{$slice : [1, 2]}
skips the first element of the array and returns up to the next two.