How to get array value(value) of input type=checkbox?

So the bottom line is that there is

input type="checkbox" value="

So the question is how to use jquery to get this array(which is checked) ! To then do with it whatever you want))) But how to get around I realized that the $(input:checkbox:checked).map(function() {return this.value;}).get(); pulls all , but the problem occurs if we have two , three or more inputов, i.e. the need to pull these arrays depending on inputов, not all together in a heap! Help plz)
July 12th 19 at 17:05
1 answer
July 12th 19 at 17:07
$('input[name="desired name"]:checked').map(function() {return this.value; })
yeah totally forgot to add the name in the example! But the point is that the name must be static and the same for subsequent transmission value in the controller! The point is to split this array using js and convert to a string like 1,2,3,4,5... and then to transmit to the controller by the same name(why not urabotat in a controller using php, don't ask)! I thought using the id magic tipo id="row"that it dynamically changed , but something went wrong! - Samir commented on July 12th 19 at 17:10

Find more questions by tags HTMLJavaScriptjQuery