Hello,I am Sigmund and i am working on a project and i need to make a request to pull out informations from one specific user, i made the request but it’s not working, i don’t don’t what i am doing wrong. This is the code i made to retrieve the name from the database.
Where firebaseDb is the id of the FirebaseDatabase element, and i also privided the confi, either the projecId, databaseUrl,apiKey, and the applicationId for it.
Thanks in advance! , this how my database looks like.
firebaseDb.getUserValue("name",function(success, key, value){
if(success) {
console.log("Success: object retrieve", value)
}else {
console.log("DB write error:")
}
})
My database looks like this
{
“users”: {
“userId”: {
“expdate”: “xxxx”
“name”: “cccc”
“username”: “dddd”
}
}
}
The userId is a group of caracteres generated automatically by firebase at the insertion.