PdfPrep.com

Consider that our posts collection contains an array field called tags that contains tags that the user enters. {

Consider that our posts collection contains an array field called tags that contains tags that the user enters. {

Which of the following commands will find all the posts that have been tagged as tutorial.
A . db.posts.find( { tags : ["tutorial"] } );
B . db.posts.find( { $array : {tags: "tutorial") > );
C . db.posts.find( { tags : "tutorial" } );
D . db.posts.findInArray( { tags : "tutorial" > );

Answer: C

Exit mobile version