It might be duplicate, sorry for that but I couldn't understand (New to firebase and JS).
I have a snapshot from firebase, but I couldn't understand how to parse that snapshot object.
Here is my code:
var obj = snapshot.val();
console.log(JSON.stringify(obj));
It outputs following:
{"-KpxDFnJEt2xlD21lzyh":{"chatid":"6qKi8xO5vxdrcKFd5wqUNUkTupg2PNQjC87cFNcKxYkDoYMdhH95LCK2"}}
I want to get this -KpxDFnJEt2xlD21lzyh value in a separate variable and chatid into separate variable, but not be able to.
What should I do?