Create a list of most popular items
In my photo sharing app, we've added a "liking" ability much like other sites. So have the likes stored in a collection with the id of the photo and user id of the person that liked it.
What i need to do now is come up with a way to making a photo feed of the photos that get the most likes. Each like is saved as a separate row or record in the collection.
so how can i count the like's collection and find the photo id numbers that have the highest count. Or how can i just create a photo feed that is sorted by the number of likes that they've received.
Any direction is appreciated.