Delete a row in a grid

I would like to delete the income tax row from the deductions in the “salary structure” doctype.
How would I go about doing that with a custom script?

 frappe.ui.form.on("Salary Structure Earning", "modified_value", function(frm, cdt, cdn) {
   for( var i = 0; i < frm.doc.deductions.length; i++) {
     if( frm.doc.deductions[i].d_type == 'Income Tax' ) {

Unfortunately as I realized there is no such function as delete() in the above code. How would I do this?

remove it from frm.doc.deductions and call frm.refresh_field("deductions");