{"action":"created","issue":{"url":"https://api.github.com/repos/umpirsky/country-list/issues/62","repository_url":"https://api.github.com/repos/umpirsky/country-list","labels_url":"https://api.github.com/repos/umpirsky/country-list/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/umpirsky/country-list/issues/62/comments","events_url":"https://api.github.com/repos/umpirsky/country-list/issues/62/events","html_url":"https://github.com/umpirsky/country-list/issues/62","id":191571941,"node_id":"MDU6SXNzdWUxOTE1NzE5NDE=","number":62,"title":"JSON is kind of useless unless it has proper key/values","user":{"login":"bonatoc","id":956531,"node_id":"MDQ6VXNlcjk1NjUzMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/956531?v=4","gravatar_id":"","url":"https://api.github.com/users/bonatoc","html_url":"https://github.com/bonatoc","followers_url":"https://api.github.com/users/bonatoc/followers","following_url":"https://api.github.com/users/bonatoc/following{/other_user}","gists_url":"https://api.github.com/users/bonatoc/gists{/gist_id}","starred_url":"https://api.github.com/users/bonatoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonatoc/subscriptions","organizations_url":"https://api.github.com/users/bonatoc/orgs","repos_url":"https://api.github.com/users/bonatoc/repos","events_url":"https://api.github.com/users/bonatoc/events{/privacy}","received_events_url":"https://api.github.com/users/bonatoc/received_events","type":"User","site_admin":false},"labels":[{"id":622121,"node_id":"MDU6TGFiZWw2MjIxMjE=","url":"https://api.github.com/repos/umpirsky/country-list/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-24T17:50:42Z","updated_at":"2018-07-18T09:12:40Z","closed_at":null,"author_association":"NONE","body":"With JS frameworks, and more generally REST APIs/HTTP requests, the current JSON structures are not much help, since we can't programmatically target keys.\r\n\r\nHow about this structure?\r\n\r\n```\r\n[\r\n    { \r\n        id: 'AF', \r\n        value:'Afghanistan' \r\n    },\r\n    {\r\n        id: 'ZA', \r\n        value:'Afrique du Sud' \r\n    },\r\n...\r\n]\r\n```"},"comment":{"url":"https://api.github.com/repos/umpirsky/country-list/issues/comments/405865412","html_url":"https://github.com/umpirsky/country-list/issues/62#issuecomment-405865412","issue_url":"https://api.github.com/repos/umpirsky/country-list/issues/62","id":405865412,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTg2NTQxMg==","user":{"login":"senyaak","id":15360093,"node_id":"MDQ6VXNlcjE1MzYwMDkz","avatar_url":"https://avatars0.githubusercontent.com/u/15360093?v=4","gravatar_id":"","url":"https://api.github.com/users/senyaak","html_url":"https://github.com/senyaak","followers_url":"https://api.github.com/users/senyaak/followers","following_url":"https://api.github.com/users/senyaak/following{/other_user}","gists_url":"https://api.github.com/users/senyaak/gists{/gist_id}","starred_url":"https://api.github.com/users/senyaak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senyaak/subscriptions","organizations_url":"https://api.github.com/users/senyaak/orgs","repos_url":"https://api.github.com/users/senyaak/repos","events_url":"https://api.github.com/users/senyaak/events{/privacy}","received_events_url":"https://api.github.com/users/senyaak/received_events","type":"User","site_admin":false},"created_at":"2018-07-18T09:12:40Z","updated_at":"2018-07-18T09:12:40Z","author_association":"NONE","body":"```js\r\nObject.getOwnPropertyNames(json)\r\nObject.keys(json)\r\nfor(let key in json) {\r\n  // ...\r\n}\r\n```\r\nwill do the thing - no need for changing the structure"}}
{"actor":{"display_login":"senyaak"}}