GroupBy and CountsCreated 4 months ago by jzachary
I have a stream of basic entries with a text field for a name, I want to be able to count how many duplicate names are in the stream. I did a groupBy the name text field and it would get an array key error. Switched to using a query() instead of entries()
Short answer is that it works, and I can get the count of the items in each group as I iterate through, but I want to sort the entries by the count or size and I'm not sure how to go about that in my front end. It's a basic setup with streams created in the streams addon and just displaying in twig. At the moment I can list all the unique entries with the count for each but I cant sort it by that count.
Can basic front end stuff handle this type of thing or do i need to move this into a controller, etc?