Skip to content Skip to sidebar Skip to footer

Smart Way To Push Object To Firebase

I have an object that I want to push to the firebase realtime database, looking like this: userProfile = { name: 'Jon', age: 25, gender: 'male', ...plenty more attributes} If I wa

Solution 1:

The answer could not be easier, but in case someone else stumbles across the same issue:

firebase.database().ref('/userProfile').push(userProfile)

Thanks guys

Post a Comment for "Smart Way To Push Object To Firebase"