You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I want to know if it's possible to sort my query in this way.
My className is called "Shop"
Each shop have a field called "campaignsDateString" who is an array of String like that :
["8/28/2020", "8/30/2020", "8/31/2020", "8/31/2020","9/1/2020"]
On my query I want to get all shops who have campaigns for specifics dateString, who is also an array of String
["8/28/2020", "8/30/2020]
So on my query I have this constraint
query.whereKey("campaignsDateString", containedIn:["8/28/2020", "8/29/2020])
if for example I have 2 shops like this
SHOP1
campaignsDateString = ["8/28/2020", "8/30/2020", "8/31/2020", "8/31/2020","9/1/2020"]
I want to sort my results by occurrences of campaignsDateString matching my array ["8/28/2020", "8/29/2020]
The second shop have 5 times "8/28/2020" and the first shop only one time, so i want to get Shop 1 in first.
If someone have an idea of how to do that.
Thanks
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. If you believe it should stay open, please let us know! As always, we encourage contributions, check out the Contributing Guide
Hi,
I want to know if it's possible to sort my query in this way.
My className is called "Shop"
Each shop have a field called "campaignsDateString" who is an array of String like that :
["8/28/2020", "8/30/2020", "8/31/2020", "8/31/2020","9/1/2020"]
On my query I want to get all shops who have campaigns for specifics dateString, who is also an array of String
["8/28/2020", "8/30/2020]
So on my query I have this constraint
query.whereKey("campaignsDateString", containedIn:["8/28/2020", "8/29/2020])
if for example I have 2 shops like this
SHOP1
campaignsDateString = ["8/28/2020", "8/30/2020", "8/31/2020", "8/31/2020","9/1/2020"]
SHOP2
campaignsDateString = ["8/28/2020", "8/28/2020","8/28/2020", "8/28/2020","8/28/2020", "8/28/2020"]
I want to sort my results by occurrences of campaignsDateString matching my array ["8/28/2020", "8/29/2020]
The second shop have 5 times "8/28/2020" and the first shop only one time, so i want to get Shop 1 in first.
If someone have an idea of how to do that.
Thanks
The text was updated successfully, but these errors were encountered: