I want to write my Data in a Firebase Realtime Database, but the problem is that the first value of the child should have the value of a variable but the variable is not recognized at variable. It should look like this:
so I tried:
let id = chatid + "::::" + username;
let input = document.getElementById('input').value;
firebase.database().ref('chat/'+ chatid + "/chat").set({
id: input
})
but the id variable is not recognized as a variable, thats why in the firebase console it looks like this:
How to fix that?