How do I access a specific blueprint value from every article?

I want make a sidebar that shows the 5 best products. In every article I save via blueprint a variable ‘rating’ a number.
I know how do access it in a single article, like this:

<?php echo $page->rating()->html() ?>

But I don’t know how I could do a best list in the sidebar. I am not so good in coding : (

Maybe sth. like:

$bestProducts = $products->sortBy('rating', 'desc')->limit(5);

(not tested)

1 Like

You are the best. Thank you <3