I want to get the Unique categories from my blog posts - but also return the count of how many posts are in each category
Currently I have this
= blog( 'portfolio' ).articles.map { | r | r.data.category }.uniq.sort
I guess I need to remove the Uniq and Sort and do some Group.by then sort.
Any help appreciated to get this one liner sorted and fast
Cheers
Ian