implement ajax deletion through json from api