consider
var adaRef = firebase.database().ref(\"users/ada\");
How can I get the full path of ref ? that is \"users/ada\" ?
Following on Frank's answer I extended firebase as follows:
firebase.database.Reference.prototype.fullkey = function() {
return this.toString().substring(this.root.toString().length-1);
}
then you can do
adaRef.fullkey() // returns /users/ada
(I would like to call this 'path' but that seems to be reserved by FB)