Delete object

To delete an object we will use the

object.destroy method:

var car = Simbla.Object.extend("Cars");
var query = new Simbla.Query(car);
query.get("WY0DQyj9L6 ", {
    success: function(car) {
      car.destroy({
          success: function(car) {
            alert("Object deleted");
          },
          error: function(car, error) {
            alert("Object not deleted");
          }
      });
    },
    error: function(car, error) {
       alert("Object not found");
    }
});