How to Organize Bundles Output Data to Give Me 5 Highest Numbers From Greatest to least?

Hello!

How would i go about organizing data to give me the 5 highest numbers?

For this scenario, 30 bundles were output. I would like to output the 5 bundles out of the 30 with the highest numbers under “result” and organize them from greatest to least.

Context: i am organizing an excel based on products sold and i am looking to see what my top 5 selling products are based on money generated.

Thank you so much for your help!

Hello,

you can use an Aggregator module to combine all of the bundles in a single array. Then use the sort() function to reorder them highest to lowest and then slice() to get the first 5 items.