I’m trying to get all options values of a multiple select with the following code.
var service_m = $("#SelectRight>option").map(function () { return $(this).val(); });
When I do this I only get [object Object] in return.
Any suggestions on how to solve this?
Try:
That will store all values in
arrarray.If you want them to be a single string with comma separated, you can go further like this: