{"action":"closed","issue":{"url":"https://api.github.com/repos/d3/d3-selection/issues/98","repository_url":"https://api.github.com/repos/d3/d3-selection","labels_url":"https://api.github.com/repos/d3/d3-selection/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/d3/d3-selection/issues/98/comments","events_url":"https://api.github.com/repos/d3/d3-selection/issues/98/events","html_url":"https://github.com/d3/d3-selection/issues/98","id":179020485,"number":98,"title":"Idea: *selection*.end()","user":{"login":"au-phiware","id":816686,"avatar_url":"https://avatars.githubusercontent.com/u/816686?v=3","gravatar_id":"","url":"https://api.github.com/users/au-phiware","html_url":"https://github.com/au-phiware","followers_url":"https://api.github.com/users/au-phiware/followers","following_url":"https://api.github.com/users/au-phiware/following{/other_user}","gists_url":"https://api.github.com/users/au-phiware/gists{/gist_id}","starred_url":"https://api.github.com/users/au-phiware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/au-phiware/subscriptions","organizations_url":"https://api.github.com/users/au-phiware/orgs","repos_url":"https://api.github.com/users/au-phiware/repos","events_url":"https://api.github.com/users/au-phiware/events{/privacy}","received_events_url":"https://api.github.com/users/au-phiware/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-24T09:09:53Z","updated_at":"2016-09-25T02:42:26Z","closed_at":"2016-09-25T02:42:26Z","body":"I'm a fan of jQuery's [`.end()`](http://api.jquery.com/end/) method. I think a similar `d3-selection` method would be useful.\r\n\r\nExample:\r\n\r\n    d3.select('body')\r\n      .selectAll('svg')\r\n        .data(...)\r\n        .enter()\r\n          .append('svg')\r\n            .attr(...)\r\n            .append('g')\r\n              .each(...)\r\n            .end() // g\r\n          .end() // svg\r\n          .append('p').text(\"I'm below each svg element.\").end()\r\n        .end() // enter\r\n      .end() // join\r\n      .append('p').text(\"I'm at the end of the body element.\");\r\n\r\nNot sure how it would work with `merge`, or if the data join causes other problems.\r\n\r\nWould you be interested if I wrote a quick PR?"}}
{"actor":{"display_login":"au-phiware"}}