简体   繁体   中英

Delete an object from Parse.com

What I have is when the page loads a list of all the names in the database is displayed to the user along with a button that says "Delete". Also I have a textbox for the user to enter a name and a button to save the name to the database than refresh the page to add the new name to the bottom of the list.

What I'm asking is how can i get the "Delete" button in this Live Example to delete/drop the object to the left of the button from the database ie delete the name.

two pieces of data would be necessary for a delete from the list:

list index of the NAME entry with FOCUS at the time of the button click event Parse objectId in NAME Class for the NAME entry above

Then, you just follow the parse docs for doing a delete on a specific object from a class.

For REST Api example you would call delete on the following:

curl -X DELETE \
  -H "X-Parse-Application-Id: MLAbR" \
  -H "X-Parse-REST-API-Key: jkuI9" \
  https://api.parse.com/1/classes/NAME/Ed1nuqPvcm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM