【发布时间】:2016-01-15 22:28:59
【问题描述】:
我有一个如下所示的 JSON 架构:
{
"_id" : ObjectId("5692a3e124de1e0ce2dfda22"),
"title" : "A Decade of Decadence, Pt. 2: Legacy of Dreams",
"year" : 2013,
"rated" : "PG-13",
"released" : ISODate("2013-09-13T04:00:00Z"),
"runtime" : 65,
"countries" : [
"USA"
],
"genres" : [
"Documentary"
],
"director" : "Drew Glick",
"writers" : [
"Drew Glick"
],
"actors" : [
"Gordon Auld",
"Howie Boulware Jr.",
"Tod Boulware",
"Chen Drachman"
],
"plot" : "A behind the scenes look at the making of A Tiger in the Dark: The Decadence Saga.",
"poster" : null,
"imdb" : {
"id" : "tt2199902",
"rating" : 8,
"votes" : 50
},
"awards" : {
"wins" : 0,
"nominations" : 0,
"text" : ""
},
"type" : "movie"
}
我正在寻找一部 2013 年上映的电影,评级为 PG-13,并且没有获奖。我在 Mongo Shell 中尝试了以下查询,但没有运气:
db.movieDetails.find({rated: "PG-13", year:2013, awards: { wins : 0}})
有什么想法吗?
【问题讨论】:
标签: json mongodb mongodb-query