Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongoose find if starts with

User.find({ username: {$regex : "^" + req.params.username}})
 
PREVIOUS NEXT
Tagged: #mongoose #find #starts
ADD COMMENT
Topic
Name
8+8 =