AGGREGATE Movies Tutorial: Difference between revisions
From NoSQLZoo
Created page with "==Investigating the Movie Database== The movie database includes thousands of movies with documents such as: ==Casablanca== <div class=q data-lang="mongo"> Show the details o..." |
|||
| Line 13: | Line 13: | ||
]) | ]) | ||
</pre> | </pre> | ||
< | <pre class=ans>db.world.aggregate([ | ||
db.world.aggregate([ | |||
{$match:{ | {$match:{ | ||
title:'Casablanca' | title:'Casablanca' | ||
}} | }} | ||
]) | ]) | ||
</ | </pre> | ||
</div> | </div> | ||
Revision as of 23:23, 14 October 2016
Investigating the Movie Database
The movie database includes thousands of movies with documents such as:
Casablanca
Show the details of the movie Casablanca
db.world.aggregate([
{$match:{
title:'Casablanca'
}},
])
db.world.aggregate([
{$match:{
title:'Casablanca'
}}
])