How to sort/filter dynamic dataset with non-database fields

Hi All,

I have a dynamic dataset of products and I display them using a repeater. I use $w( ‘#repeater1’ ).onItemReady to compute a ‘Recommendation’ rating for each product. This rating is computed on the fly and is not part of the product dataset. I display this rating using one of the elements in the repeater item.

How do I sort/filter the product list in the repeater based on this external value?

Here is my code snippet:
$w.onReady( function () {
$w( ‘#repeater1’ ).onItemReady(($item, itemData, index) => {
let rating= calculateRating(itemData);
$item( ‘#ratingsDisplay1’ ).rating = rating;
});
});

@sapirh @yisrael-wix - Can anyone from Wix help?