我正在尝试按名称中包含空格的字段进行排序,有什么解决方法?
查询:
this.query = this.query.sort("Review Score");
型号:
["Review Score"]: {
type: String,
},
答案 0 :(得分:1)
升序:
this.query = this.query.sort({ "Review Score": 1 });
降序:
this.query = this.query.sort({ "Review Score": -1 });