I want to remove a value from firebase database with value using jquery.
I want to delete 235 value from the firebase.
I tried..
var dbRef = new Firebase("https://afgani-cinemas.firebaseio.com/");
var showId = getUrlParameter('showId');
var bookings = dbRef.child('bookings/'+showId);
function removeFromFB(seatId){
dbRef.orderByValue().equalTo().on('child_added', function(snapshot){
snapshot.dbRef().remove();
});
}
removeFromFB(235);
Any suggestions in my code. Its not working!!!
getting warning like this
firebase.js:40 FIREBASE WARNING: Using an unspecified index. Consider adding ".indexOn": ".value" at / to your security rules for better performance

new Firebasesyntax has been superseded over 1.5 years ago. For help in upgrading the code, see firebase.google.com/support/guides/…child_addedcallback being invoked?