Setting custom key when pushing new data to firebase database

后端 未结 10 608
野的像风
野的像风 2020-12-13 12:22

Well, I am new to Firebase and I want to have my own keys while pushing new data to database.

Problem:

FireBase.push().setValue(mapped_values);
         


        
10条回答
  •  清歌不尽
    2020-12-13 13:05

    Calling push() will generate a key for you.

    If instead you use child(), you can determine they key/path yourself.

    ref.child("Victor").setValue("setting custom key when pushing new data to firebase database");
    

提交回复
热议问题