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' ) {
       frm.doc.deductions[i].delete();
     }
   }
 });

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

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