the selected value is: ["4", "5", "6"]
The code which I have now:
$.each(selected, function(){
$('input[type=hidden][name="ids[]"]').val(selected);
});
is resulting in:
array:1 [▼
0 => "4,5,6"
]
I need these selected elements to be their own index of the array so that I can loop through it in my controller. Could someone please help me assign the seperate array values to a hidden value
array[0].split(',')