Need help in filtering collection with highest rating products

I am using Jude.me App to collect reviews and my theme is Belle, I want add a functionality that I can sort collection as highest rating same as we can sort best selling, highest Price etc. Can anyone help me in finding solution for this. I am not able to find how can I connect review data with Highest rating (top rated) sorting option.

Find reference of photo we are able to add Word Review by adding sorting method in default.json file, but I am not able to fetch review data.

I guess best rating will be REVIEWS in your app.

And you have HIGHEST PRICE

Hi,

You’ll need to connect the review data with the sorting mechanism in Shopify

Steps -

  • Get review data via API or JSON from Jude.me.
  • Create custom sorting option in default.json.
  • Fetch ratings data using JavaScript.
  • Implement a sorting function based on product ratings and Test performance.