Logical OR for two different fields in $where queries in mongodb

db.hotels.find({
    $where: "/london/i.test(this.city) || /hilton/i.test(this.hotel)"
})
Topics: MongoDB

Related Code Examples