Search duplicated subfields

From: Szaniszlo Szöke <szoke.szaniszlo@xxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Mon, 25 Apr 2016 06:08:16 -0700 (PDT)
Why ads?
Hi,

Searching for duplicated fields works find with aggregation :
{"$group" : { _id: "$a1", "count": { "$sum": 1 } } }
{"$match": {"count" : {"$gt": 1} } }
{"$project": {"a1" : "$_id", "_id" : 0} }

As field "a1" is an array of integers, I expected to find duplicates of the 
first element by replacing "a1" by "a1.0"
That doesn't work, the returned document is empty : { "a1" : { "0" : [] } }

Any idea how to proceed ?

TIA

-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/7b58b637-63f9-464e-88c4-f32b6c4c0335%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?