consider
var adaRef = firebase.database().ref(\"users/ada\");
How can I get the full path of ref ? that is \"users/ada\" ?
That's surprisingly simple:
adaRef.toString()
Will print the full URL: https://
So to just get the path, you substring it out of there. Two ways of doing that are:
adaRef.toString().substring(firebase.database().ref().toString().length-1)
or:
adaRef.toString().substring(adaRef.root.toString().length-1)
both will print /users/ada