Questions Regarding MongoDB C100DBA Associate Exam

You are missing the $slice projection operator. Use it to specify the number of elements in the array to return in the query result.

db.c.find( { > , { b : { $slice : [ 0 , 5 ] } } )

I’d recommend this source https://www.examskit.com as I found it helpful during my exam preparation. Here you can find these types of questions with answers.

3 Likes