I'm trying to find all elements within an array called programme. The result of running db.base.find({"programme.title":"News"},{"programme.$.title":"News"}).pretty() is:
{
"_id" : ObjectId("55a48dd3e72db9d63e53478b"),
"programme" : [
{
"attributes" : {
"start" : "20150713010000 -0400",
"stop" : "20150713013000 -0400",
"channel" : "I47176.labs.zap2it.com"
},
"title" : "News",
"category" : "News",
"episode-num" : "SH01831861.0000",
"new" : true
}
]
}
But there are many more entries called "News", not just one, as shown above.
I've also tried db.base.find({"programme.title":"News"}).pretty() but that just results in listing a bunch of random entries, whether or not they have the title of "News".
Thanks a lot for the help, and obligatory "apologies for noob question".