error in fetching the data from mongodb database with particular string present in name

前端 未结 0 1134
生来不讨喜
生来不讨喜 2021-01-30 02:21
const temp = req.query.text;
const result = await User.find({
  name: { $regex: /req.query.text/i },
}).select("name");
console.log(result);
return res.json(20         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题