Transform items specific attribute and sort afterwards with this

I’m building an instantsearch.js filtering only page and I want to change ‘price’ attribute with an third-party API integration. I found out that I can manipulate data with instantsearch.widgets.hits.transformItems, but I know need to sort them accordingly with this new data ‘price’ attribute. Furthermore, I read that I can do with items.sort function, but I couldnt find a documentation and the way I can use it. Then I may need to also update rangeSlider price facet with those spacing new values :smiley:

I did a sorting like:

items.sort(function (a, b) {
	return parseInt(b.price) >= parseInt(a.price);

But it only sorts this first page. How I can update all objects and do a whole sort?