Saahiththiyan Mathivathanan
03/21/2023, 1:20 AMagents
, each agent in that index can have primary_market
.
Example, for an agent called Jack primary_market: [Sydney-NSW-2000-Australia, Pots-Point-NSW-Australia]
, For an agent called Bill primary_market: [Pots-Point-NSW-Australia, Sydney-NSW-2000-Australia]
When i filter for agents using the slug Sydney-NSW-2000-Australia
i want to have Jack on top of the results based on the position of the slug inside the primary_market
and Bill to be at the bottom of the results.
Basically i want to sort the results based on the position of the slug i am filtering by inside the primary_market
array.
Likewise if i filter for agents using the slug Pots-Point-NSW-Australia
i want Bill to be at the top of the results and jack to be at the bottom.
Is that even possible? or even an alternative way where i can achieve the same outcome? Any help would be awesome.Kishore Nallan
03/21/2023, 3:06 AM