Mongodb – Query to do indepth search for a regex is not working properly
I'm having one query to do indepth search for a regex in mongoDB. I'm using JS function inside the query like this - db.collection.find( {$where: function() { function deepIterate(obj, value) { var new_value = new RegExp("^"+value, "i"); for (var field…