{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/query-string/issues/147","repository_url":"https://api.github.com/repos/sindresorhus/query-string","labels_url":"https://api.github.com/repos/sindresorhus/query-string/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/query-string/issues/147/comments","events_url":"https://api.github.com/repos/sindresorhus/query-string/issues/147/events","html_url":"https://github.com/sindresorhus/query-string/pull/147","id":328053130,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNjg3ODQ3","number":147,"title":"Support stringifying objects into querystrings ","user":{"login":"k1sul1","id":2719615,"node_id":"MDQ6VXNlcjI3MTk2MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/2719615?v=4","gravatar_id":"","url":"https://api.github.com/users/k1sul1","html_url":"https://github.com/k1sul1","followers_url":"https://api.github.com/users/k1sul1/followers","following_url":"https://api.github.com/users/k1sul1/following{/other_user}","gists_url":"https://api.github.com/users/k1sul1/gists{/gist_id}","starred_url":"https://api.github.com/users/k1sul1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k1sul1/subscriptions","organizations_url":"https://api.github.com/users/k1sul1/orgs","repos_url":"https://api.github.com/users/k1sul1/repos","events_url":"https://api.github.com/users/k1sul1/events{/privacy}","received_events_url":"https://api.github.com/users/k1sul1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-31T09:03:14Z","updated_at":"2018-06-04T16:46:37Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/sindresorhus/query-string/pulls/147","html_url":"https://github.com/sindresorhus/query-string/pull/147","diff_url":"https://github.com/sindresorhus/query-string/pull/147.diff","patch_url":"https://github.com/sindresorhus/query-string/pull/147.patch"},"body":"For whatever reason, I need to send these kinds of query strings to a server:\r\n\r\n`_embed=1&settings[prefetch]=false&settings[expiry]=3600`\r\n\r\nI figured I'd use a similar data structure; a JavaScript object, and was a bit annoyed when stringifying `{settings: { prefetch: false, expiry: 3600 }}` resulted in an url encoded [object object].\r\n\r\nThis fixes that. I added a new arrayFormat option, `key`. \r\n\r\nI tried giving a shot at `parse`, but we need one way conversion only at this point, and I couldn't figure it out in 10 minutes, so I gave up. Regular expressions are incomprehensible to me."},"comment":{"url":"https://api.github.com/repos/sindresorhus/query-string/issues/comments/394422415","html_url":"https://github.com/sindresorhus/query-string/pull/147#issuecomment-394422415","issue_url":"https://api.github.com/repos/sindresorhus/query-string/issues/147","id":394422415,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDQyMjQxNQ==","user":{"login":"Chieftl","id":338721,"node_id":"MDQ6VXNlcjMzODcyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/338721?v=4","gravatar_id":"","url":"https://api.github.com/users/Chieftl","html_url":"https://github.com/Chieftl","followers_url":"https://api.github.com/users/Chieftl/followers","following_url":"https://api.github.com/users/Chieftl/following{/other_user}","gists_url":"https://api.github.com/users/Chieftl/gists{/gist_id}","starred_url":"https://api.github.com/users/Chieftl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chieftl/subscriptions","organizations_url":"https://api.github.com/users/Chieftl/orgs","repos_url":"https://api.github.com/users/Chieftl/repos","events_url":"https://api.github.com/users/Chieftl/events{/privacy}","received_events_url":"https://api.github.com/users/Chieftl/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T16:46:37Z","updated_at":"2018-06-04T16:46:37Z","author_association":"NONE","body":"Can you tell me please, how about nested objects?\r\n`{settings: { prefetch: false, expiry: {endDate: 5} }}`\r\n\r\nResult looks like:\r\n`settings[prefetch]=false&settings[expiry]=[object Object]`"}}
{"actor":{"display_login":"Chieftl"}}