title: How to save the autoID to the created child?
body: <p>I've read a lot of articles on this website, which were focusing on writing data to the Firebase Database. However, none of them could solve my problem.</p>
  
  <p>I've created an object with an autoID, however to delete it later on, I need the autoID I've created the object with. For that reason I need to save the autoID to that object. It just doesn't work out. </p>
  
  <p>Here is the code:</p>
  
  <p>@IBAction func Save(_ sender: Any) {</p>
  
  <pre><code>    let Town = Stadt.text
      let surface = Untergrund.text
      let size = Groesse.text
      let numberof = AnzToreKoerbe.text
      let laenge = longitudeLabel.text
      let breite = latitudeLabel.text
      let street = Strasse.text
      let Art = Platzart.text
      var PlatzID = ""
  
  
      var upload : [String : AnyObject] = ["Platzart": Art as AnyObject,
                                           "Laengengrad" : laenge as AnyObject,
                                           "Breitengrad" : breite as AnyObject,
                                           "Stadt" : Town as AnyObject,
                                           "Strasse" : street as AnyObject,
                                           "Untergrund" : surface as AnyObject,
                                           "Groesse" : size as AnyObject,
                                           "AnzahlToreKoerbe" : numberof as AnyObject,
                                           "PlatzID" : PlatzID as AnyObject]
  
  
      ref?.child("Sportplatz").childByAutoId().setValue(upload)
  
      PlatzID = (ref?.key)!
  
      ref?.updateChildValues(["PlatzID" : PlatzID as AnyObject])
  </code></pre>
  
  <p>I've tried to save the key, as some of the articles recommended and then update the child "PlatzID" with that key. 
  When I create a new object, the PlatzID ist still empty.</p>
  
  <p>Thanks for your help.</p>