'How to create a method to edit fields (google sheets) for json call with google script

This is the method created for reading, but I'm having trouble creating the function to edit and delete, if anyone can help I appreciate

function Read(e) {
  var rows = sheet.getRange(2, 1, sheet.getLastRow() - 1, sheet.getLastColumn()).getValues();
  var data = [];
  for (var i = 0; i < rows.length; i++) {
    var row = rows[i];
    var record = {};
    record['Data'] = row[0];
    record['House'] = row[1];
    record['Platform'] = row[2];
    record['Description'] = row[3];
    record['Type'] = row[4];
    record['WorkerSupplier'] = row[5];
    record['Image'] = row[6];
    record['Amount'] = row[7];
    record['Paid'] = row[8];
    data.push(record);
  } var result = JSON.stringify(data);
  return ContentService.createTextOutput(result).setMimeType(ContentService.MimeType.JSON);
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source