This works! BUT if my JSON returns 200 programs, this will also print all those 200 programs. BUT I want to change the helper method in a way that it only return TOP 5 that their ercentage is the highest.
How Can I modify my helper method to achieve this?
P.S: I know probably the best and professional way of doing this is working with "scope" and "order",etc in the Model files or the ActiveRecord query interfaced that actually creates the JSON...but that is for now way out of my leauge! Wanted to get this done with baby steps...that for later...