Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongodb $in regex

// Find user who has the first_name equal with "name" (case insensitive)
const users = await User.find({
	first_name: {
    	$in: [new RegExp(`^${name}$`, 'i'))]
    }
})
 
PREVIOUS NEXT
Tagged: #mongodb #regex
ADD COMMENT
Topic
Name
3+1 =