Retrieve the values in the array from a repeat

I have a query that returns user IDs from a repeat.
I want to display a list of comma separated user IDs in my SendMail component.
How do I get there from the above results of my repeat on server side?

You can use join to make a comma separated string from the original query:

qryMatchingKeys.join(',', 'user_id')

Thanks! I was focusing on the wrong output.
It is easier than expected and now I’ve learned how to use join in that context.