title: Deleting object from parse-server code causing error?
body: <p>I am developing an app in Xcode using swift and am using a heroku-hosted parse-server as my database. I want to be able to delete an object from the database, but I keep getting an error when trying to type out the code. Here is what I have:</p>
  
  <pre><code>{
          let removingObjectQuery = PFQuery(className: "GoingTo")
          removingObjectQuery.whereKey("objectId", equalTo: goingToSelectionID)
          removingObjectQuery.findObjectsInBackground(block: { (object, error) in
              if let objects = object{
                  print("Object found")
                  for object in objects{
                          object.deleteInBackground()  
                  }
              }
          })
      }
  </code></pre>
  
  <p>But the delete <code>.deleteInBackground</code> keeps sending an error to in the code line saying that ".deleteInBackground is not a member of [PFObject]"... except that I thought it <em>is</em> a member of that value type?</p>
  
  <p>Edit: Syntax fixed to allow calling of <code>.deleteInBackground</code> but now am receiving error in logs (which does not crash the app) that "[Error]: Object not found". The object is for sure in the DB and whereKey <code>equalTo:</code> is adequately described... (goingToSelectionID is indeed the objectId in the DB... checked this by printing to logs). Not sure what is wrong?</p>