var thename = \'Andrew\'; db.collection.find({\'name\':thename});
How do I query case insensitive? I want to find result even if \"andrew\";
To find case Insensitive string use this,
var thename = "Andrew"; db.collection.find({"name":/^thename$/i})