I’m not sure what you mean by “grouped by”. JSON API just supports returning an array of resources; if you want to group those resources, you have to do that on the client-side. You can filter by genre, i.e. only get resources in your response that are of a certain genre(s), but that’s not the same as grouping.
You could also do GET /genres?include=movies. Each resource object in the primary data of this response would be a genre that has a relationships.movies.data property, and the movies themselves would be in included. This gives you the grouping you want.
It’s a bit six of this half-a-dozen-of-the-other, but I wanted to point out the option.