How to hide a coloum from dataTable

How to hide a coloum from dataTable

tharu12tharu12 Posts: 1Questions: 0Answers: 0

I'm using serverside processing . there some pages does have data with usergroups and some don't. when sending data im passing a parameter call "groupEnable" with value of true or false.
How can I check this in js and show coloumns with data only have groupEnable == true.

js

"columns": [
{"data": "groupname"},

data

        $response = array(
            "draw" => intval($draw),
            "recordsTotal" => $total,
            "recordsFiltered" => $total,
            "groupEnable" => $groupEnable,
This discussion has been closed.