title: How to delete objects from an array stored in Parse column
body: <p>So , I've made a class called <code>Posts</code> in Parse.com.. This is the image of the class <code>Posts</code> <a href="https://i.stack.imgur.com/xrbAy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xrbAy.png" alt="enter image description here"></a></p>
  
  <p>here you can see in <code>objectId</code> column there are objectIds of all the <code>Posts</code> and in the column <code>likes</code> I'm saving the ObjectIds of users who is liking the post.. so basically if a user tap on unlike button the current user's Id should be deleted . this is my current code:</p>
  
  <pre><code> var query:PFQuery = PFQuery(className: "Posts")
   query.whereKey("objectId", equalTo: postData.objectId!)
   query.whereKey("likes", equalTo: PFUser.currentUser()!.objectId!)
   query.findObjectsInBackgroundWithBlock({ (objects, error) -&gt; Void in
  
    if let objects = objects {
  
     for object in objects {
  
      object.deleteInBackground()
  
      }
  
      }
   })
  </code></pre>
  
  <p>but it deletes the whole row not the user id of current user.. </p>