{"action":"created","issue":{"url":"https://api.github.com/repos/5outh/nanoscope/issues/59","labels_url":"https://api.github.com/repos/5outh/nanoscope/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/5outh/nanoscope/issues/59/comments","events_url":"https://api.github.com/repos/5outh/nanoscope/issues/59/events","html_url":"https://github.com/5outh/nanoscope/issues/59","id":72232836,"number":59,"title":"lens.path('a.b.c') === lens.path('a').path('b').path('c');","user":{"login":"menelaos","id":7543610,"avatar_url":"https://avatars.githubusercontent.com/u/7543610?v=3","gravatar_id":"","url":"https://api.github.com/users/menelaos","html_url":"https://github.com/menelaos","followers_url":"https://api.github.com/users/menelaos/followers","following_url":"https://api.github.com/users/menelaos/following{/other_user}","gists_url":"https://api.github.com/users/menelaos/gists{/gist_id}","starred_url":"https://api.github.com/users/menelaos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/menelaos/subscriptions","organizations_url":"https://api.github.com/users/menelaos/orgs","repos_url":"https://api.github.com/users/menelaos/repos","events_url":"https://api.github.com/users/menelaos/events{/privacy}","received_events_url":"https://api.github.com/users/menelaos/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-30T17:50:13Z","updated_at":"2015-05-01T08:54:18Z","closed_at":"2015-04-30T21:33:10Z","body":"It would be cool if one could chain paths:\r\n\r\n```javascript\r\nlens.path('a.b.c') === lens.path('a').path('b').path('c');\r\n```\r\n\r\nWould that make sense?\r\n"},"comment":{"url":"https://api.github.com/repos/5outh/nanoscope/issues/comments/98081167","html_url":"https://github.com/5outh/nanoscope/issues/59#issuecomment-98081167","issue_url":"https://api.github.com/repos/5outh/nanoscope/issues/59","id":98081167,"user":{"login":"menelaos","id":7543610,"avatar_url":"https://avatars.githubusercontent.com/u/7543610?v=3","gravatar_id":"","url":"https://api.github.com/users/menelaos","html_url":"https://github.com/menelaos","followers_url":"https://api.github.com/users/menelaos/followers","following_url":"https://api.github.com/users/menelaos/following{/other_user}","gists_url":"https://api.github.com/users/menelaos/gists{/gist_id}","starred_url":"https://api.github.com/users/menelaos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/menelaos/subscriptions","organizations_url":"https://api.github.com/users/menelaos/orgs","repos_url":"https://api.github.com/users/menelaos/repos","events_url":"https://api.github.com/users/menelaos/events{/privacy}","received_events_url":"https://api.github.com/users/menelaos/received_events","type":"User","site_admin":false},"created_at":"2015-05-01T08:54:18Z","updated_at":"2015-05-01T08:54:18Z","body":"Hey 5outh,\r\n\r\nsorry to bother you once more but if I run the following example,\r\nthe two approaches do not yield the same result:\r\n\r\n```javascript\r\nlet game = {\r\n    player: {\r\n        location: { x: 6, y: 10},\r\n        color: 'Yellow',\r\n        unnecessaryInformation: 'nobody-cares'\r\n    },\r\n    enemies: [\r\n        {\r\n            location: { x: 10, y: 20 },\r\n            name: 'Pinky',\r\n            traits: ['Mischievous','Persistent', 'Tricky']\r\n        },\r\n        {\r\n            location: { x: 2, y: 22 },\r\n            name: 'Clyde',\r\n            traits: ['Ignorant', 'Goofy', '##$@??']\r\n        }\r\n    ],\r\n    pelletLocations: [{ x: 10, y: 12 }, {x: 11, y: 15 }]\r\n};\r\n\r\nlet lens = nanoscope(game);\r\nlet game1 = lens.path('player.name.first').set('Pac-Man');\r\nlet game2 = lens.path('player')\r\n                .path('name')\r\n                .path('first')\r\n                .set('Pac-Man');\r\nconsole.log(game1.player.name.first); // 'Pac-Man'\r\nconsole.log(game2.player.name.first); // Error as name == null\r\n```\r\nFurthermore\r\n\r\n```javascript\r\nlet obj = { a : { b : { c : 'yo' } } };\r\nlet lens1 = nanoscope(obj).path('a').path('b').path('c');\r\nlet lens2 = nanoscope(obj).path('a.b.c');\r\nconsole.log(lens1); // Compose {...}\r\nconsole.log(lens2); // PathLens {...}\r\n```\r\n\r\nAm I missing something?\r\n"}}