Category "mongodb-shell"

mongodb shell login - password contains special characters like -(hyphen) and '(single quote)

I am trying to login to mongodb database using mongodb shell, and if the password contains any special characters like -(hyphen) or '(single quote) , it gives e

MongoDB $or query

I run following query in mongo shell: db.Profiles.find ( { $or : [ { "name" : "gary" }, {"name":"rob} ] } ) It just returns nothing as expected(JSON)?