{"action":"closed","issue":{"url":"https://api.github.com/repos/sindresorhus/query-string/issues/87","repository_url":"https://api.github.com/repos/sindresorhus/query-string","labels_url":"https://api.github.com/repos/sindresorhus/query-string/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/query-string/issues/87/comments","events_url":"https://api.github.com/repos/sindresorhus/query-string/issues/87/events","html_url":"https://github.com/sindresorhus/query-string/issues/87","id":215336659,"number":87,"title":"parse() with arrayFormat bracket bug?","user":{"login":"theogravity","id":855434,"avatar_url":"https://avatars2.githubusercontent.com/u/855434?v=3","gravatar_id":"","url":"https://api.github.com/users/theogravity","html_url":"https://github.com/theogravity","followers_url":"https://api.github.com/users/theogravity/followers","following_url":"https://api.github.com/users/theogravity/following{/other_user}","gists_url":"https://api.github.com/users/theogravity/gists{/gist_id}","starred_url":"https://api.github.com/users/theogravity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theogravity/subscriptions","organizations_url":"https://api.github.com/users/theogravity/orgs","repos_url":"https://api.github.com/users/theogravity/repos","events_url":"https://api.github.com/users/theogravity/events{/privacy}","received_events_url":"https://api.github.com/users/theogravity/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-20T06:07:42Z","updated_at":"2017-03-20T06:13:47Z","closed_at":"2017-03-20T06:13:47Z","body":"I'm trying to do the following:\r\n\r\n```\r\nconst obj = qs.parse('a[]=value&a[]=value2&b=1234', { arrayFormat: 'bracket' })\r\n\r\nI was expecting:\r\n{\r\n   a: ['value', 'value2'],\r\n   b: 1234\r\n}\r\n\r\nBut I actually get:\r\n\r\n{\r\n   a[]: ['value', 'value2'],\r\n   b: 1234\r\n}\r\n```\r\n\r\nCompare this to the behavior without adding in the non-array value:\r\n\r\n```\r\n// removed b\r\nconst obj = qs.parse('a[]=value&a[]=value2', { arrayFormat: 'bracket' })\r\n\r\nResult:\r\n\r\n{\r\n   a: ['value', 'value2']\r\n}\r\n\r\n```\r\n\r\nI also noticed the test cases for the parse function does not cover the first situation as well. Potential bug?\r\n"}}
{"actor":{"display_login":"theogravity"}}