Constructing request body for creating record (Javascript)

I’m trying to write a function that creates a record from form data but I’m not sure how to construct the request body. Especially since data that going into a multiple select field have to be converted to an array.

Any ideas on how to solve this?