Hi all, I have a query like the following
setIsFetchingProducts(true);
const Product = Moralis.Object.extend(ProductKeys.tableName);
const query = new Moralis.Query(Product);
query.equalTo(ProductKeys.hiddenProduct, false);
query.equalTo(ProductKeys.projectId, project.id);
query.descending(ProductKeys.createdAt);
// I want to be able to do something like query.descending(ProductKeys.featured);
query.skip(page * perPage);
query.limit(perPage);
query.withCount();
where it fetches the product in descending order based on createdAt. However, I also want to prioritize the order so it fetches products that are also “featured”. How can I query and sort based on these 2 fields?