How to update particular value of child in Firebase DB

前端 未结 3 1667
南旧
南旧 2020-12-29 17:21

I am following this document. Following is my code for update:

func updateDealResultToServer(key:String,dealResult : String)
{

    let post = [\"dealResul\"         


        
3条回答
  •  滥情空心
    2020-12-29 17:27

    I suggest using setValue for single child updates (keep in mind that I am using Swift 3, slight syntax changes may apply but you should be fine):

    rootRef.child("komal_kyz").child(key).setValue(["dealResul":dealResult])
    

提交回复
热议问题