To get the key after pushing an object in Firebase:
javascriptlet ref = firebase.database().ref('/someReference'); let key = ref.push().key;
let ref = firebase.database().ref('/someReference'); let key = ref.push().key;
Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.