0๐
I think you have to loop through all the products and return
<input type="hidden" :value="selectedProducts[index]" name="selectedProducts[]">
and then maybe add some identifier to the array like
<input type="hidden" :value="selectedProducts[index]" name="selectedProducts[`${product.id}`]">
Source:stackexchange.com