I want to Delete Specific value from Firebase Database following is Database which i have stored
Now, I want to Delete Following Values
fname: "John"
lname: "wick"
Here, What i have try to delete specific value from Firebase..
DatabaseReference demo = mReference.child("demo").orderByValue().equalTo("John").getRef();
demo.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
dataSnapshot.getRef().removeValue();
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
But this will delete all values from database...
Question
: How to delete that specific value??? what i have to do for that
Any help will be appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…