{"action":"created","comment":{"url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/comments/58325947","id":58325947,"diff_hunk":"@@ -0,0 +1,53 @@\n+$(document).ready(function() {\n+    \n+    loadJson();\n+    \n+    //Attempts to load data from JSON file\n+    function loadJson(){\n+        $.getJSON('data.json')\n+        .done(function(data){\n+            buildHtml(data);\n+            console.log(\"json loaded\");\n+        })\n+        .fail(function(){\n+            console.log(\"data retrieval failed\");\n+        });\n+    }\n+    \n+    //Builds HTML and inserts into document\n+    function buildHtml(jData){\n+        var $insertPoint = $(\"#content\");\n+        $.each(jData, function(key, val){\n+            var htmlInsertion = \"<div class='detail_area' id='\";\n+            htmlInsertion += (key + \"'><h2 id='\" + key + \"' alt='\" + val.name + \"'>\" + val.name + \"</h2><p>\" + val.description + \"</p><h3>Benefits</h3><ul>\");\n+            for(var i = 0; i < val.benefits.length;i++){\n+                htmlInsertion += (\"<li>\" + val.benefits[i] + \"</li>\");\n+            }\n+            htmlInsertion += (\"</ul><h3>Drawbacks</h3><ul>\");\n+            for(var i = 0; i < val.drawbacks.length; i++){","path":"script.js","position":27,"original_position":27,"commit_id":"748a71662961d86c727211e1c25b198a12ba12ff","original_commit_id":"748a71662961d86c727211e1c25b198a12ba12ff","user":{"login":"mbMosman","id":5143491,"avatar_url":"https://avatars.githubusercontent.com/u/5143491?v=3","gravatar_id":"","url":"https://api.github.com/users/mbMosman","html_url":"https://github.com/mbMosman","followers_url":"https://api.github.com/users/mbMosman/followers","following_url":"https://api.github.com/users/mbMosman/following{/other_user}","gists_url":"https://api.github.com/users/mbMosman/gists{/gist_id}","starred_url":"https://api.github.com/users/mbMosman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbMosman/subscriptions","organizations_url":"https://api.github.com/users/mbMosman/orgs","repos_url":"https://api.github.com/users/mbMosman/repos","events_url":"https://api.github.com/users/mbMosman/events{/privacy}","received_events_url":"https://api.github.com/users/mbMosman/received_events","type":"User","site_admin":false},"body":"for loop variables should also be defined at the top of the function scope. There is no for loop scope in JS.","created_at":"2016-04-04T03:38:23Z","updated_at":"2016-04-04T03:38:23Z","html_url":"https://github.com/htc-ccis2591/jquery-project2/pull/14#discussion_r58325947","pull_request_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/comments/58325947"},"html":{"href":"https://github.com/htc-ccis2591/jquery-project2/pull/14#discussion_r58325947"},"pull_request":{"href":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/14","id":65092767,"html_url":"https://github.com/htc-ccis2591/jquery-project2/pull/14","diff_url":"https://github.com/htc-ccis2591/jquery-project2/pull/14.diff","patch_url":"https://github.com/htc-ccis2591/jquery-project2/pull/14.patch","issue_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/issues/14","number":14,"state":"open","locked":false,"title":"ok","user":{"login":"mbMosman","id":5143491,"avatar_url":"https://avatars.githubusercontent.com/u/5143491?v=3","gravatar_id":"","url":"https://api.github.com/users/mbMosman","html_url":"https://github.com/mbMosman","followers_url":"https://api.github.com/users/mbMosman/followers","following_url":"https://api.github.com/users/mbMosman/following{/other_user}","gists_url":"https://api.github.com/users/mbMosman/gists{/gist_id}","starred_url":"https://api.github.com/users/mbMosman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbMosman/subscriptions","organizations_url":"https://api.github.com/users/mbMosman/orgs","repos_url":"https://api.github.com/users/mbMosman/repos","events_url":"https://api.github.com/users/mbMosman/events{/privacy}","received_events_url":"https://api.github.com/users/mbMosman/received_events","type":"User","site_admin":false},"body":"Adding missing pull request","created_at":"2016-04-04T03:35:15Z","updated_at":"2016-04-04T03:38:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"beeb11110ff330612f769c62c0496ba366cc68b3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/14/commits","review_comments_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/14/comments","review_comment_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/issues/14/comments","statuses_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/statuses/748a71662961d86c727211e1c25b198a12ba12ff","head":{"label":"caleb4716:gh-pages","ref":"gh-pages","sha":"748a71662961d86c727211e1c25b198a12ba12ff","user":{"login":"caleb4716","id":14006903,"avatar_url":"https://avatars.githubusercontent.com/u/14006903?v=3","gravatar_id":"","url":"https://api.github.com/users/caleb4716","html_url":"https://github.com/caleb4716","followers_url":"https://api.github.com/users/caleb4716/followers","following_url":"https://api.github.com/users/caleb4716/following{/other_user}","gists_url":"https://api.github.com/users/caleb4716/gists{/gist_id}","starred_url":"https://api.github.com/users/caleb4716/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caleb4716/subscriptions","organizations_url":"https://api.github.com/users/caleb4716/orgs","repos_url":"https://api.github.com/users/caleb4716/repos","events_url":"https://api.github.com/users/caleb4716/events{/privacy}","received_events_url":"https://api.github.com/users/caleb4716/received_events","type":"User","site_admin":false},"repo":{"id":54422768,"name":"jquery-project2","full_name":"caleb4716/jquery-project2","owner":{"login":"caleb4716","id":14006903,"avatar_url":"https://avatars.githubusercontent.com/u/14006903?v=3","gravatar_id":"","url":"https://api.github.com/users/caleb4716","html_url":"https://github.com/caleb4716","followers_url":"https://api.github.com/users/caleb4716/followers","following_url":"https://api.github.com/users/caleb4716/following{/other_user}","gists_url":"https://api.github.com/users/caleb4716/gists{/gist_id}","starred_url":"https://api.github.com/users/caleb4716/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caleb4716/subscriptions","organizations_url":"https://api.github.com/users/caleb4716/orgs","repos_url":"https://api.github.com/users/caleb4716/repos","events_url":"https://api.github.com/users/caleb4716/events{/privacy}","received_events_url":"https://api.github.com/users/caleb4716/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/caleb4716/jquery-project2","description":"Project 2 - Favorite Things","fork":true,"url":"https://api.github.com/repos/caleb4716/jquery-project2","forks_url":"https://api.github.com/repos/caleb4716/jquery-project2/forks","keys_url":"https://api.github.com/repos/caleb4716/jquery-project2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caleb4716/jquery-project2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caleb4716/jquery-project2/teams","hooks_url":"https://api.github.com/repos/caleb4716/jquery-project2/hooks","issue_events_url":"https://api.github.com/repos/caleb4716/jquery-project2/issues/events{/number}","events_url":"https://api.github.com/repos/caleb4716/jquery-project2/events","assignees_url":"https://api.github.com/repos/caleb4716/jquery-project2/assignees{/user}","branches_url":"https://api.github.com/repos/caleb4716/jquery-project2/branches{/branch}","tags_url":"https://api.github.com/repos/caleb4716/jquery-project2/tags","blobs_url":"https://api.github.com/repos/caleb4716/jquery-project2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caleb4716/jquery-project2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caleb4716/jquery-project2/git/refs{/sha}","trees_url":"https://api.github.com/repos/caleb4716/jquery-project2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caleb4716/jquery-project2/statuses/{sha}","languages_url":"https://api.github.com/repos/caleb4716/jquery-project2/languages","stargazers_url":"https://api.github.com/repos/caleb4716/jquery-project2/stargazers","contributors_url":"https://api.github.com/repos/caleb4716/jquery-project2/contributors","subscribers_url":"https://api.github.com/repos/caleb4716/jquery-project2/subscribers","subscription_url":"https://api.github.com/repos/caleb4716/jquery-project2/subscription","commits_url":"https://api.github.com/repos/caleb4716/jquery-project2/commits{/sha}","git_commits_url":"https://api.github.com/repos/caleb4716/jquery-project2/git/commits{/sha}","comments_url":"https://api.github.com/repos/caleb4716/jquery-project2/comments{/number}","issue_comment_url":"https://api.github.com/repos/caleb4716/jquery-project2/issues/comments{/number}","contents_url":"https://api.github.com/repos/caleb4716/jquery-project2/contents/{+path}","compare_url":"https://api.github.com/repos/caleb4716/jquery-project2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caleb4716/jquery-project2/merges","archive_url":"https://api.github.com/repos/caleb4716/jquery-project2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caleb4716/jquery-project2/downloads","issues_url":"https://api.github.com/repos/caleb4716/jquery-project2/issues{/number}","pulls_url":"https://api.github.com/repos/caleb4716/jquery-project2/pulls{/number}","milestones_url":"https://api.github.com/repos/caleb4716/jquery-project2/milestones{/number}","notifications_url":"https://api.github.com/repos/caleb4716/jquery-project2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caleb4716/jquery-project2/labels{/name}","releases_url":"https://api.github.com/repos/caleb4716/jquery-project2/releases{/id}","deployments_url":"https://api.github.com/repos/caleb4716/jquery-project2/deployments","created_at":"2016-03-21T21:07:09Z","updated_at":"2016-03-23T22:11:15Z","pushed_at":"2016-03-23T22:11:15Z","git_url":"git://github.com/caleb4716/jquery-project2.git","ssh_url":"git@github.com:caleb4716/jquery-project2.git","clone_url":"https://github.com/caleb4716/jquery-project2.git","svn_url":"https://github.com/caleb4716/jquery-project2","homepage":null,"size":507,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"gh-pages"}},"base":{"label":"htc-ccis2591:gh-pages","ref":"gh-pages","sha":"9b2cf535f841740b54695cce919a49d2b0abf445","user":{"login":"htc-ccis2591","id":12668622,"avatar_url":"https://avatars.githubusercontent.com/u/12668622?v=3","gravatar_id":"","url":"https://api.github.com/users/htc-ccis2591","html_url":"https://github.com/htc-ccis2591","followers_url":"https://api.github.com/users/htc-ccis2591/followers","following_url":"https://api.github.com/users/htc-ccis2591/following{/other_user}","gists_url":"https://api.github.com/users/htc-ccis2591/gists{/gist_id}","starred_url":"https://api.github.com/users/htc-ccis2591/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htc-ccis2591/subscriptions","organizations_url":"https://api.github.com/users/htc-ccis2591/orgs","repos_url":"https://api.github.com/users/htc-ccis2591/repos","events_url":"https://api.github.com/users/htc-ccis2591/events{/privacy}","received_events_url":"https://api.github.com/users/htc-ccis2591/received_events","type":"Organization","site_admin":false},"repo":{"id":53544632,"name":"jquery-project2","full_name":"htc-ccis2591/jquery-project2","owner":{"login":"htc-ccis2591","id":12668622,"avatar_url":"https://avatars.githubusercontent.com/u/12668622?v=3","gravatar_id":"","url":"https://api.github.com/users/htc-ccis2591","html_url":"https://github.com/htc-ccis2591","followers_url":"https://api.github.com/users/htc-ccis2591/followers","following_url":"https://api.github.com/users/htc-ccis2591/following{/other_user}","gists_url":"https://api.github.com/users/htc-ccis2591/gists{/gist_id}","starred_url":"https://api.github.com/users/htc-ccis2591/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htc-ccis2591/subscriptions","organizations_url":"https://api.github.com/users/htc-ccis2591/orgs","repos_url":"https://api.github.com/users/htc-ccis2591/repos","events_url":"https://api.github.com/users/htc-ccis2591/events{/privacy}","received_events_url":"https://api.github.com/users/htc-ccis2591/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/htc-ccis2591/jquery-project2","description":"Project 2 - Favorite Things","fork":false,"url":"https://api.github.com/repos/htc-ccis2591/jquery-project2","forks_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/forks","keys_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/teams","hooks_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/hooks","issue_events_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/issues/events{/number}","events_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/events","assignees_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/assignees{/user}","branches_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/branches{/branch}","tags_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/tags","blobs_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/git/refs{/sha}","trees_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/statuses/{sha}","languages_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/languages","stargazers_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/stargazers","contributors_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/contributors","subscribers_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/subscribers","subscription_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/subscription","commits_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/commits{/sha}","git_commits_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/git/commits{/sha}","comments_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/comments{/number}","issue_comment_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/issues/comments{/number}","contents_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/contents/{+path}","compare_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/merges","archive_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/downloads","issues_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/issues{/number}","pulls_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls{/number}","milestones_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/milestones{/number}","notifications_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/labels{/name}","releases_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/releases{/id}","deployments_url":"https://api.github.com/repos/htc-ccis2591/jquery-project2/deployments","created_at":"2016-03-10T01:20:51Z","updated_at":"2016-03-10T01:28:07Z","pushed_at":"2016-04-04T03:35:16Z","git_url":"git://github.com/htc-ccis2591/jquery-project2.git","ssh_url":"git@github.com:htc-ccis2591/jquery-project2.git","clone_url":"https://github.com/htc-ccis2591/jquery-project2.git","svn_url":"https://github.com/htc-ccis2591/jquery-project2","homepage":null,"size":2,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":1,"forks":12,"open_issues":1,"watchers":0,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/14"},"html":{"href":"https://github.com/htc-ccis2591/jquery-project2/pull/14"},"issue":{"href":"https://api.github.com/repos/htc-ccis2591/jquery-project2/issues/14"},"comments":{"href":"https://api.github.com/repos/htc-ccis2591/jquery-project2/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htc-ccis2591/jquery-project2/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/htc-ccis2591/jquery-project2/statuses/748a71662961d86c727211e1c25b198a12ba12ff"}}}}