NO Result appear

When i execute the following query in the shell no result appears. Please Guide is there anything wrong with the query for shell…
db.movies.find({cast: [“Jeff Bridges”,“Tim Robbins”]})

I also tried the this…
MongoDB Enterprise Cluster0-shard-0:PRIMARY> db.movies.find({“cast.0”: “Jeff Bridges”}).pretty()
but no error and no result

Hey @Mohammad_Saqib_73399

What results are you expecting?

db.movies.find({cast: [“Jeff Bridges”,“Tim Robbins”]})

Above will find all records that have a cast array exactly like [“Jeff Bridges”,“Tim Robbins”]

db.movies.find({“cast.0”: “Jeff Bridges”}).pretty()

Will pretty print all records that have Jeff Bridges as the first item in the cast array.

Is this what you expected?

2 Likes

Thank you… I fixed it … It was error of Db Name - Case Sensitivity

Closing this thread as the issue has been resolved.