title: group by category with 5 post of each category in wordpress REST api single Request
body: <p>I am not sure if this has been answered before, but vigorous googling has not led me anywhere so far.</p>
  
  <p>I have a Wordpress site where I would like to display all posts, as usual, ordered by date. However, instead of setting a limit on the total number of posts displayed, I would like to set a limit on each category in a single API request. I am using WP version 5.2.</p>
  
  <p>What is the best, most clean and maintainable way to achieve this?</p>
  
  <p>I would be very grateful for any help.</p>