I am following this document. Following is my code for update:
func updateDealResultToServer(key:String,dealResult : String)
{
let post = ["dealResul": dealResult]
let childUpdates =
["/komal_xyz/\(key)": post
]
rootRef.updateChildValues(childUpdates)
}
This Is my Firebase database structure:
I want to only change the value for dealResult
. Whenever I try to run above code for particular child node like 1473670100726
, other value except dealResul
is deleted.