Datatables dropdown of rows sharing the same value

I have a datatable consisting of some orders. When the order is created, it generates a task which groups the orders, so there could be multiple orders sharing the same task ID. Right now, the way I render data to the table is just the default, each individual order is rendered to the table without any grouping and that’s exactly what I want. I want to group the rows with sharing task IDs, so there will be only one order with maybe some icon which if would be pressed it would render the rest of the orders sharing the same task ID.
Here’s my datatables ajax settings :

public static function jsAjax(string $url, string $table = "dataTables")
    {
        $js = self::js();
        $js .= "<script type='text/javascript' language='javascript'>
        $('#" . $table . "').dataTable({
        responsive: true,
        stateSave: true,
        autoWidth: false,
        processing: true,
        serverSide: true,
        ajax: {
            type: 'POST',
            url: '" . $url . "',
            data: {'command': '" . $table . "'},
        },
        order: [[ 0, 'desc' ]],
        'language': {
            'url': '/language/Georgian.json'
        }
        });
        </script>";
        return $js;
    }

Here’s my table for some visuals :
enter image description here

Thanks for any help!