Bubble Star Rating in Repeating Group

I have the bubble star rating (Star Rating - Bubble Docs) within a repeating group to rate different categories which are loaded via API.

How can I select the values of the different star ratings and connect them with the right category id?

I was thinking about states but I dont know how to set the set in the repeating group (e.g. set category id) then oninputchange of the star rating store this information in e.g. local storage and at the end read all that data. but my plan did not work so far.

Anyone experience with such a setting?