I need to get the value of a checkbox provided with span in table rows. The code below is part of my project. The HTML code is for dynamic my table and javascript code is for getting the value of elements which does not work for the checkbox (it works for other input elements).

my table:

```
var html = '<tr class="rows" id="r'+row_id+'" style="">';
html += '<td><input type="text" id = "abc" style="height:30px" class="rtl form-control" size="20" name="" /></td>';
html += '<td><input type="text" style="height:30px" class="rtl form-control" size="25" name="" /></td>';
html += '<td style="text-align: center;">'+
'<label class="switch switch-label switch-pill switch-primary switch-sm" style="direction:ltr;">'+
'<input type="checkbox" value="1" data-size="mini" class="switch-input">'+
'<span class="switch-slider" data-checked="✓" data-unchecked="✕" unchecked></span></label>'+
'</td>'+
'<td><button class="btn btn-warning DT_action_minus" id="btn'+row_id+'" style="height:25px;width:25px;padding:0px;" href="#" title="delete">'+
'<i class="fa fa-minus" style="align:center" aria-hidden="true"></i></button></td>'+
'</tr>';

```

getting the values:

```
var tbl = document.getElementById('descriptive-table');
var rCount = tbl.rows.length;
var cCount = 3;
var allArray = [];
for (var i = 1; i <rCount; i++){
    var rowArray = [];
    for (var j = 0; j <cCount; j++){                            
        rowArray.push(tbl.rows[i].cells[j].children[0].value);
    }
    allArray.push(rowArray);
}
console.log(allArray);

```