I have a table showing database values as shown here:

```
<?php
       while ($single = $output->fetch_assoc()):?> 
  <tr>
    <td> <?php echo $single['Dptname']; ?></td>
    <td> <?php echo $single['firstname']; ?> </td>
    <td> <?php echo $single['lastname']; ?> </td>
    <td> <?php echo $single['email']; ?> </td>
    <td> <?php echo $single['phnumber']; ?> </td>
    <td> <?php echo $single['provider']; ?> </td>
     <td style="display: none"> <?php echo $single['id']; ?></td>
    <td><input type="checkbox" class="Dptadmin" id="Dptadmin" value="1"></td>
    <td><input type="checkbox" class="superuser" id="superuser" value="1"></td>
    <td><button type="button" class="btn b1 editbtn" data-toggle="modal" value="" data-target="#myModal"> <i class="fa fa-pencil-square-o">  </i> </button>
        <a href="process.php?delete=<?php echo $single['id'];?>" class="b2"><i class="fa fa-trash-o"></i> </a>
    </td>
  </tr>
    <?php endwhile;?>

```

jQuery:

```
<script>
 $(document).ready(function (){
    $('.editbtn').on('click', function(){
        $('#editmodal').modal('show');
        $tr = $(this).closest('tr');
        var data = $tr.children('td').map(function(){
          return $(this).text();
        }).get();
        console.log(data);
        $('#Dptname').val(data[0]);
        $('#firstname').val(data[1]);
        $('#lastname').val(data[2]);
        $('#email').val(data[3]);
        $('#phnumber').val(data[4]);
        $('#provider').val(data[5]);
        $('#userid').val(data[6]);
        $('#userid').val(data[6]);
        $('#Dptadmin').val(data[7]);
    });
 }); 

```

Tried:-

```
 $('.Dptadmin').on('click', function(){
     $tr = $(this).closest('tr');
        var data = $tr.children('td').map(function(){
          return $(this).text();
        }).get();
        console.log(data);
        $('#userid').val(data[6]);
        var val = $(this).find(":checkbox['<?php echo $single['Dadmin']; ?>']").val();
        console.log(val);

```

As above jQuery, from `console.log(data)` I'm getting the value of selected TD, but not getting checkbox value. Thank you in advance.