我想查询一下SQL的like查询:
SELECT * FROM users WHERE name LIKE '%m%'
Run Code Online (Sandbox Code Playgroud)
如何在MongoDB中做同样的事情?
我like在文档中找不到运算符.
我想尝试使用模板文字并且它不起作用:它显示文字变量名称而不是值.我使用的是Chrome v50.0.2(和jQuery).
console.log('categoryName: ${this.categoryName}\ncategoryElements: ${this.categoryElements} ');
Run Code Online (Sandbox Code Playgroud)
${this.categoryName}
categoryElements: ${this.categoryElements}
Run Code Online (Sandbox Code Playgroud)