Add delete func for json api