Smart way to push object to firebase

后端 未结 1 421
小蘑菇
小蘑菇 2021-01-24 10:19

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 mo         


        
相关标签:
1条回答
  • 2021-01-24 10:36

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

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

    Thanks guys

    0 讨论(0)
提交回复
热议问题