{"action":"created","comment":{"url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/comments/137214027","pull_request_review_id":60849588,"id":137214027,"diff_hunk":"@@ -0,0 +1,221 @@\n+const MongoDB = require('mongodb')\n+const mongoClient = MongoDB.MongoClient\n+const clear = require('clear')\n+const readline = require('readline')\n+const rl = readline.createInterface({\n+  input: process.stdin,\n+  output: process.stdout\n+})\n+\n+const url = `mongodb://localhost:27017/crunchbase`\n+\n+mongoClient.connect(url, (error, db) => {\n+  if (error) {\n+    console.log('Error trying to connect to the Database')\n+    console.log(error)\n+  } else {\n+    console.log('Connection established correctly!! 😬')\n+    mainMenu(db)\n+  }\n+})\n+\n+function mainMenu(db) {\n+  clear()\n+  printMenu()\n+  rl.question('Type an option: ', (option) => {\n+    switch (option) {\n+      case \"1\": listAllCompaniesName(db); break;\n+      case \"2\": numberOfCompanies(db); break;\n+      case \"3\": numberOfCompaniesFoundedIn2004(db); break;\n+      case \"4\": listByNameCompaniesFoundedInFebruary2004(db); break;\n+      case \"5\": listByNameCompaniesFoundedInSummer2004SortByDate(db); break;\n+      case \"6\": companiesWithOfficesInBcn(db); break;\n+      case \"7\": the10CompaniesWithMoreEmployeesAscSort(db); break;\n+      case \"8\": getFacebookCompany(db); break;\n+      case \"9\": numFacebookEmployees(db); break;\n+      case \"10\": allFacebookProducts(db); break;","path":"starter-code/main.js","position":36,"original_position":36,"commit_id":"b1a043a0fad131e8ba5320f1ea034e2532577250","original_commit_id":"b1a043a0fad131e8ba5320f1ea034e2532577250","user":{"login":"ta-web-mad","id":26923217,"avatar_url":"https://avatars3.githubusercontent.com/u/26923217?v=4","gravatar_id":"","url":"https://api.github.com/users/ta-web-mad","html_url":"https://github.com/ta-web-mad","followers_url":"https://api.github.com/users/ta-web-mad/followers","following_url":"https://api.github.com/users/ta-web-mad/following{/other_user}","gists_url":"https://api.github.com/users/ta-web-mad/gists{/gist_id}","starred_url":"https://api.github.com/users/ta-web-mad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ta-web-mad/subscriptions","organizations_url":"https://api.github.com/users/ta-web-mad/orgs","repos_url":"https://api.github.com/users/ta-web-mad/repos","events_url":"https://api.github.com/users/ta-web-mad/events{/privacy}","received_events_url":"https://api.github.com/users/ta-web-mad/received_events","type":"User","site_admin":false},"body":"En este caso, la respuesta debe ser filtrada. Response (res) --> filter o map te sirve para acceder aquello que quieres. Veo que en el 11 lo hiciste OK. Solo es un comentario. Buen trabajo Yaiza, enhorabuena.","created_at":"2017-09-06T09:17:17Z","updated_at":"2017-09-06T09:17:17Z","html_url":"https://github.com/ironhack-labs/lab-mongo-crunchbase/pull/75#discussion_r137214027","pull_request_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/75","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/comments/137214027"},"html":{"href":"https://github.com/ironhack-labs/lab-mongo-crunchbase/pull/75#discussion_r137214027"},"pull_request":{"href":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/75"}}},"pull_request":{"url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/75","id":139493584,"html_url":"https://github.com/ironhack-labs/lab-mongo-crunchbase/pull/75","diff_url":"https://github.com/ironhack-labs/lab-mongo-crunchbase/pull/75.diff","patch_url":"https://github.com/ironhack-labs/lab-mongo-crunchbase/pull/75.patch","issue_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/issues/75","number":75,"state":"open","locked":false,"title":"DE_Yaiza","user":{"login":"y4izus","id":17231966,"avatar_url":"https://avatars0.githubusercontent.com/u/17231966?v=4","gravatar_id":"","url":"https://api.github.com/users/y4izus","html_url":"https://github.com/y4izus","followers_url":"https://api.github.com/users/y4izus/followers","following_url":"https://api.github.com/users/y4izus/following{/other_user}","gists_url":"https://api.github.com/users/y4izus/gists{/gist_id}","starred_url":"https://api.github.com/users/y4izus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y4izus/subscriptions","organizations_url":"https://api.github.com/users/y4izus/orgs","repos_url":"https://api.github.com/users/y4izus/repos","events_url":"https://api.github.com/users/y4izus/events{/privacy}","received_events_url":"https://api.github.com/users/y4izus/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-09-06T07:51:24Z","updated_at":"2017-09-06T09:17:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"70a4ee97a9e38a9c128c944753061a0330907240","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/75/commits","review_comments_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/75/comments","review_comment_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/issues/75/comments","statuses_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/statuses/b1a043a0fad131e8ba5320f1ea034e2532577250","head":{"label":"y4izus:master","ref":"master","sha":"b1a043a0fad131e8ba5320f1ea034e2532577250","user":{"login":"y4izus","id":17231966,"avatar_url":"https://avatars0.githubusercontent.com/u/17231966?v=4","gravatar_id":"","url":"https://api.github.com/users/y4izus","html_url":"https://github.com/y4izus","followers_url":"https://api.github.com/users/y4izus/followers","following_url":"https://api.github.com/users/y4izus/following{/other_user}","gists_url":"https://api.github.com/users/y4izus/gists{/gist_id}","starred_url":"https://api.github.com/users/y4izus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y4izus/subscriptions","organizations_url":"https://api.github.com/users/y4izus/orgs","repos_url":"https://api.github.com/users/y4izus/repos","events_url":"https://api.github.com/users/y4izus/events{/privacy}","received_events_url":"https://api.github.com/users/y4izus/received_events","type":"User","site_admin":false},"repo":{"id":102484476,"name":"lab-mongo-crunchbase","full_name":"y4izus/lab-mongo-crunchbase","owner":{"login":"y4izus","id":17231966,"avatar_url":"https://avatars0.githubusercontent.com/u/17231966?v=4","gravatar_id":"","url":"https://api.github.com/users/y4izus","html_url":"https://github.com/y4izus","followers_url":"https://api.github.com/users/y4izus/followers","following_url":"https://api.github.com/users/y4izus/following{/other_user}","gists_url":"https://api.github.com/users/y4izus/gists{/gist_id}","starred_url":"https://api.github.com/users/y4izus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y4izus/subscriptions","organizations_url":"https://api.github.com/users/y4izus/orgs","repos_url":"https://api.github.com/users/y4izus/repos","events_url":"https://api.github.com/users/y4izus/events{/privacy}","received_events_url":"https://api.github.com/users/y4izus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/y4izus/lab-mongo-crunchbase","description":null,"fork":true,"url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase","forks_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/forks","keys_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/teams","hooks_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/hooks","issue_events_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/issues/events{/number}","events_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/events","assignees_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/assignees{/user}","branches_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/branches{/branch}","tags_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/tags","blobs_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/git/refs{/sha}","trees_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/statuses/{sha}","languages_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/languages","stargazers_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/stargazers","contributors_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/contributors","subscribers_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/subscribers","subscription_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/subscription","commits_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/commits{/sha}","git_commits_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/git/commits{/sha}","comments_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/comments{/number}","issue_comment_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/issues/comments{/number}","contents_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/contents/{+path}","compare_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/merges","archive_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/downloads","issues_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/issues{/number}","pulls_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/pulls{/number}","milestones_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/milestones{/number}","notifications_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/labels{/name}","releases_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/releases{/id}","deployments_url":"https://api.github.com/repos/y4izus/lab-mongo-crunchbase/deployments","created_at":"2017-09-05T13:27:32Z","updated_at":"2017-09-06T06:42:42Z","pushed_at":"2017-09-06T07:50:23Z","git_url":"git://github.com/y4izus/lab-mongo-crunchbase.git","ssh_url":"git@github.com:y4izus/lab-mongo-crunchbase.git","clone_url":"https://github.com/y4izus/lab-mongo-crunchbase.git","svn_url":"https://github.com/y4izus/lab-mongo-crunchbase","homepage":null,"size":30785,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ironhack-labs:master","ref":"master","sha":"fe9f613e6dc7b355d0c177e57d1ed506991550e1","user":{"login":"ironhack-labs","id":25032046,"avatar_url":"https://avatars3.githubusercontent.com/u/25032046?v=4","gravatar_id":"","url":"https://api.github.com/users/ironhack-labs","html_url":"https://github.com/ironhack-labs","followers_url":"https://api.github.com/users/ironhack-labs/followers","following_url":"https://api.github.com/users/ironhack-labs/following{/other_user}","gists_url":"https://api.github.com/users/ironhack-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/ironhack-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironhack-labs/subscriptions","organizations_url":"https://api.github.com/users/ironhack-labs/orgs","repos_url":"https://api.github.com/users/ironhack-labs/repos","events_url":"https://api.github.com/users/ironhack-labs/events{/privacy}","received_events_url":"https://api.github.com/users/ironhack-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":80514362,"name":"lab-mongo-crunchbase","full_name":"ironhack-labs/lab-mongo-crunchbase","owner":{"login":"ironhack-labs","id":25032046,"avatar_url":"https://avatars3.githubusercontent.com/u/25032046?v=4","gravatar_id":"","url":"https://api.github.com/users/ironhack-labs","html_url":"https://github.com/ironhack-labs","followers_url":"https://api.github.com/users/ironhack-labs/followers","following_url":"https://api.github.com/users/ironhack-labs/following{/other_user}","gists_url":"https://api.github.com/users/ironhack-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/ironhack-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironhack-labs/subscriptions","organizations_url":"https://api.github.com/users/ironhack-labs/orgs","repos_url":"https://api.github.com/users/ironhack-labs/repos","events_url":"https://api.github.com/users/ironhack-labs/events{/privacy}","received_events_url":"https://api.github.com/users/ironhack-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ironhack-labs/lab-mongo-crunchbase","description":null,"fork":false,"url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase","forks_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/forks","keys_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/teams","hooks_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/hooks","issue_events_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/issues/events{/number}","events_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/events","assignees_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/assignees{/user}","branches_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/branches{/branch}","tags_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/tags","blobs_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/git/refs{/sha}","trees_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/statuses/{sha}","languages_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/languages","stargazers_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/stargazers","contributors_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/contributors","subscribers_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/subscribers","subscription_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/subscription","commits_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/commits{/sha}","git_commits_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/git/commits{/sha}","comments_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/comments{/number}","issue_comment_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/issues/comments{/number}","contents_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/contents/{+path}","compare_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/merges","archive_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/downloads","issues_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/issues{/number}","pulls_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls{/number}","milestones_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/milestones{/number}","notifications_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/labels{/name}","releases_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/releases{/id}","deployments_url":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/deployments","created_at":"2017-01-31T11:26:15Z","updated_at":"2017-08-20T01:27:50Z","pushed_at":"2017-09-06T08:20:15Z","git_url":"git://github.com/ironhack-labs/lab-mongo-crunchbase.git","ssh_url":"git@github.com:ironhack-labs/lab-mongo-crunchbase.git","clone_url":"https://github.com/ironhack-labs/lab-mongo-crunchbase.git","svn_url":"https://github.com/ironhack-labs/lab-mongo-crunchbase","homepage":null,"size":15118,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":143,"mirror_url":null,"open_issues_count":28,"forks":143,"open_issues":28,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/75"},"html":{"href":"https://github.com/ironhack-labs/lab-mongo-crunchbase/pull/75"},"issue":{"href":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/issues/75"},"comments":{"href":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/ironhack-labs/lab-mongo-crunchbase/statuses/b1a043a0fad131e8ba5320f1ea034e2532577250"}},"author_association":"NONE"}}
{"actor":{"display_login":"ta-web-mad"}}