I'm trying to get distinct values for keys inside of array:
> use test
switched to db test
> db.coll.insert({foo:[
,
{bar1: "baz22"}]});
ObjectId("4b853fad1ee5c842365f1d6e")
> db.coll.find();
{ "_id" : ObjectId("4b853fad1ee5c842365f1d6e"), "foo" : [
,
{ "bar1" : "baz22" } ] }
> db.coll.distinct("foo.bar1");
[ ]
I get empty result, but I'm waiting for [ "baz11", "baz22" ] because of "dot notation"