{"action":"created","issue":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/6200","repository_url":"https://api.github.com/repos/rethinkdb/rethinkdb","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/6200/labels{/name}","comments_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/6200/comments","events_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/6200/events","html_url":"https://github.com/rethinkdb/rethinkdb/issues/6200","id":196290102,"number":6200,"title":"How to delete a paticular Object in an array in RethinkDB (e: Cannot nest writes or meta ops in stream operations.  Use FOR_EACH instead in:)","user":{"login":"githubitsme","id":13369831,"avatar_url":"https://avatars.githubusercontent.com/u/13369831?v=3","gravatar_id":"","url":"https://api.github.com/users/githubitsme","html_url":"https://github.com/githubitsme","followers_url":"https://api.github.com/users/githubitsme/followers","following_url":"https://api.github.com/users/githubitsme/following{/other_user}","gists_url":"https://api.github.com/users/githubitsme/gists{/gist_id}","starred_url":"https://api.github.com/users/githubitsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubitsme/subscriptions","organizations_url":"https://api.github.com/users/githubitsme/orgs","repos_url":"https://api.github.com/users/githubitsme/repos","events_url":"https://api.github.com/users/githubitsme/events{/privacy}","received_events_url":"https://api.github.com/users/githubitsme/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-18T18:17:29Z","updated_at":"2016-12-18T22:52:32Z","closed_at":null,"body":"I am little Bit Confused That how to delete an single Object in an array,What is the Exact query I have to use if i have to delete this Object\r\n\r\n     {\r\n            \"name\":  \"Ram\" ,\r\n            \"username\":  \"B97bf210-c4d2d-11e6-b783-07b5fev048705\"\r\n            }\r\nfrom whoLikedIt Array\r\nMy data\r\n\r\n            {\r\n            \"comments\": [ ],\r\n            \"id\":  \"c242c74d-03d9-4963-9a22-4779facb8192\" ,\r\n           .....\r\n            \"views\": 0 ,\r\n            \"whoLikedIt\": [\r\n            {\r\n            \"name\":  \"Vignesh Warar\" ,\r\n            \"username\":  \"d97bf210-c42d-11e6-b783-07b5fe048705\"\r\n            },\r\n    {\r\n            \"name\":  \"Ram\" ,\r\n            \"username\":  \"B97bf210-c4d2d-11e6-b783-07b5fev048705\"\r\n            },\r\n            \r\n            \r\n            ]\r\n        .....\r\n            }\r\n\r\nMy Try\r\n\r\n    r.db('image').table('posts').get('c242c74d-03d9-4963-9a22-4779facb8192').update(\r\n      {whoLikedIt:r.row('whoLikedIt').filter({username:\"B97bf210-c4d2d-11e6-b783-07b5fev048705\"}).delete()}\r\n    )\r\n\r\nThrows Me a error\r\n\r\n    e: Cannot nest writes or meta ops in stream operations.  Use FOR_EACH instead in:\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/comments/267853134","html_url":"https://github.com/rethinkdb/rethinkdb/issues/6200#issuecomment-267853134","issue_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/6200","id":267853134,"user":{"login":"chrisvariety","id":44855,"avatar_url":"https://avatars.githubusercontent.com/u/44855?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisvariety","html_url":"https://github.com/chrisvariety","followers_url":"https://api.github.com/users/chrisvariety/followers","following_url":"https://api.github.com/users/chrisvariety/following{/other_user}","gists_url":"https://api.github.com/users/chrisvariety/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisvariety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisvariety/subscriptions","organizations_url":"https://api.github.com/users/chrisvariety/orgs","repos_url":"https://api.github.com/users/chrisvariety/repos","events_url":"https://api.github.com/users/chrisvariety/events{/privacy}","received_events_url":"https://api.github.com/users/chrisvariety/received_events","type":"User","site_admin":false},"created_at":"2016-12-18T22:52:31Z","updated_at":"2016-12-18T22:52:31Z","body":"This should work:\r\n\r\n```js\r\nr.db('image').table('posts').get('c242c74d-03d9-4963-9a22-4779facb8192').update(function(post) {\r\n  return {\r\n    whoLikedIt: post('whoLikedIt').filter(function(liked) {\r\n      return liked('username').ne('B97bf210-c4d2d-11e6-b783-07b5fev048705')\r\n    })\r\n  };\r\n})\r\n```"}}
{"actor":{"display_login":"chrisvariety"}}