Firebase Query And Delete Data In Javascript
Here is my firebase I would like to delete the last deed within deeds which happens to be deed id: 1. I would like to do this without specifying anything other than deleting the l
Solution 1:
You were getting close:
const deedRef = admin.database().ref('/deeds');
deedRef.limitToLast(1).once("value", (snapshot) => {
snapshot.forEach((deedSnapshot) =>{
deedSnapshot.ref.remove();
})
})
Post a Comment for "Firebase Query And Delete Data In Javascript"