Skip to content

Instantly share code, notes, and snippets.

@oogatta
Created October 2, 2017 15:34
Show Gist options
  • Save oogatta/b124bbc9fb861602e016b5cabf109649 to your computer and use it in GitHub Desktop.
Save oogatta/b124bbc9fb861602e016b5cabf109649 to your computer and use it in GitHub Desktop.
let targetReference = Database.database().reference().child("test").child("iOS")
targetReference.setValue(nil)
targetReference.childByAutoId().setValue(["hoge": 1, "fuga": 5])
targetReference.childByAutoId().setValue(["hoge": 2, "fuga": 4])
targetReference.childByAutoId().setValue(["hoge": 3, "fuga": 3])
targetReference.childByAutoId().setValue(["hoge": 4, "fuga": 2])
targetReference.childByAutoId().setValue(["hoge": 5, "fuga": 1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment