{"action":"created","issue":{"url":"https://api.github.com/repos/lodash/lodash/issues/1151","labels_url":"https://api.github.com/repos/lodash/lodash/issues/1151/labels{/name}","comments_url":"https://api.github.com/repos/lodash/lodash/issues/1151/comments","events_url":"https://api.github.com/repos/lodash/lodash/issues/1151/events","html_url":"https://github.com/lodash/lodash/issues/1151","id":69722429,"number":1151,"title":"deep path support for zipObject","user":{"login":"jasonkarns","id":119972,"avatar_url":"https://avatars.githubusercontent.com/u/119972?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonkarns","html_url":"https://github.com/jasonkarns","followers_url":"https://api.github.com/users/jasonkarns/followers","following_url":"https://api.github.com/users/jasonkarns/following{/other_user}","gists_url":"https://api.github.com/users/jasonkarns/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonkarns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonkarns/subscriptions","organizations_url":"https://api.github.com/users/jasonkarns/orgs","repos_url":"https://api.github.com/users/jasonkarns/repos","events_url":"https://api.github.com/users/jasonkarns/events{/privacy}","received_events_url":"https://api.github.com/users/jasonkarns/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lodash/lodash/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-21T02:09:25Z","updated_at":"2015-04-21T04:11:04Z","closed_at":"2015-04-21T04:11:04Z","body":"The deep path support in 3.7.0 is exciting! After updating, my first use case was for zipping an array into an object, where some of the property names use bracket/subscript notation. (More specifically, my use case is a quick one-liner to parse a query string into an object.)\r\n\r\n\r\n```js\r\n_([\r\n  [ \"a[b]\", 1 ],\r\n  [ \"a.c\", 2 ]\r\n]).object().value() //=>  { a: { b:1, c:2 } }\r\n```\r\nThere are a couple of questions as to how this would be handled for `zipObject`.\r\n\r\nClearly when zipping objects, the deep path parsing would need to be optional. But we also have a number of different sub-features:\r\n\r\n1. handling subscript notation with string key: `\"a[b]\"`\r\n2. handling dot notation: `\"a.b\"`\r\n3. handling empty subscript (to result in an array property): `\"b[]\"`\r\n4. handling explicit numerical subscript: (result in array? or object? object with string keys or numbers?): `\"b[0]\"`\r\n\r\nAnd there's the interplay with `_.pairs` to think about, as well."},"comment":{"url":"https://api.github.com/repos/lodash/lodash/issues/comments/94632984","html_url":"https://github.com/lodash/lodash/issues/1151#issuecomment-94632984","issue_url":"https://api.github.com/repos/lodash/lodash/issues/1151","id":94632984,"user":{"login":"jdalton","id":4303,"avatar_url":"https://avatars.githubusercontent.com/u/4303?v=3","gravatar_id":"","url":"https://api.github.com/users/jdalton","html_url":"https://github.com/jdalton","followers_url":"https://api.github.com/users/jdalton/followers","following_url":"https://api.github.com/users/jdalton/following{/other_user}","gists_url":"https://api.github.com/users/jdalton/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalton/subscriptions","organizations_url":"https://api.github.com/users/jdalton/orgs","repos_url":"https://api.github.com/users/jdalton/repos","events_url":"https://api.github.com/users/jdalton/events{/privacy}","received_events_url":"https://api.github.com/users/jdalton/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T04:11:04Z","updated_at":"2015-04-21T04:11:04Z","body":"Sub-features 2 & 4 are handled by `_.set`. Sub feature 1 is kind of handled if you do `a['b']` but not `a[b]` because that's like a prop name by variable (I don't want to handle it). Sub feature 3 isn't handled at all, it's treated as a normal property name because it's an invalid path.\r\n\r\nWith all the features combined it starts to feel a little too magic. If you can point to an existing implementation that would help but this seems a bit heavier than the other deep path sugar we have.\r\n"}}