I am trying to sort by a field with whitespace in the name, what is the workaround for this?
Query:
this.query = this.query.sort("Review Score");
Model:
["Review Score"]: {
type: String,
},
I am trying to sort by a field with whitespace in the name, what is the workaround for this?
Query:
this.query = this.query.sort("Review Score");
Model:
["Review Score"]: {
type: String,
},
For ascending:
this.query = this.query.sort({ "Review Score": 1 });
For descending:
this.query = this.query.sort({ "Review Score": -1 });