Multi-Select Inputs - How to Write an Array to the Database

I’m trying to do this for a keyed array but it keeps returning [object Object] for every item in the array. I can add to the array all ok but it doesn’t display correctly in the input so i can pass it thrugh the form to a server side action.

What i’m doing is sending an email, but when sending an email to multiple contacts using the sendgrid api it requires each contact to be in an array with each contacts name and email. So I created a way to input name and email then add to the array which shows up in a repeating div as buttons which shows the name as the text and the email as the value (and tittle for the tooltip to check the email is correct before sending). So I can see that the array is getting the right data but the input that as the array items as a dynamic variable always shows [object Object] for each item.

I also tried using the session and local manager but ran into the same issue with it saving correctly but not displaying in the input correctly.

How sendgrid wants to receive it.
image

The input isn’t hidden at the moment while I’m trying to figure out what’s going on.

This is the dynamic attribute setup for the array items on the input that will be hidden.