{"action":"created","issue":{"url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/3985","labels_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/3985/labels{/name}","comments_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/3985/comments","events_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/3985/events","html_url":"https://github.com/FreeCodeCamp/FreeCodeCamp/issues/3985","id":114015414,"number":3985,"title":"filter() outside authorized area","user":{"login":"MartinDelille","id":879889,"avatar_url":"https://avatars.githubusercontent.com/u/879889?v=3","gravatar_id":"","url":"https://api.github.com/users/MartinDelille","html_url":"https://github.com/MartinDelille","followers_url":"https://api.github.com/users/MartinDelille/followers","following_url":"https://api.github.com/users/MartinDelille/following{/other_user}","gists_url":"https://api.github.com/users/MartinDelille/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinDelille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinDelille/subscriptions","organizations_url":"https://api.github.com/users/MartinDelille/orgs","repos_url":"https://api.github.com/users/MartinDelille/repos","events_url":"https://api.github.com/users/MartinDelille/events{/privacy}","received_events_url":"https://api.github.com/users/MartinDelille/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-29T09:55:27Z","updated_at":"2015-10-29T18:09:05Z","closed_at":"2015-10-29T18:09:05Z","body":"Challenge [Waypoint: Prefilter JSON](http://freecodecamp.com/challenges/waypoint-prefilter-json#?solution=fccss%0A%20%20%24(document).ready(function()%20%7B%0A%0A%20%20%20%20%24(%22%23getMessage%22).on(%22click%22%2C%20function()%20%7B%0A%E2%80%89%E2%80%89%20%20%20%20%24.getJSON(%22%2Fjson%2Fcats.json%3Fcallback%3D%22%2C%20function(%20json%20)%20%7B%0A%0A%20%20%20%20%20%20%20%20var%20html%20%3D%20%22%22%3B%0A%0A%20%20%20%20%20%20%20%20json%0A%20%20%20%20%20%20%20%20.filter(function(val)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20(val.id%20!%3D%3D%201)%3B%0A%20%20%20%20%20%20%20%20%7D)%0A%20%20%20%20%20%20%20%20.map(function(val)%7B%0A%0A%E2%80%89%E2%80%89%E2%80%89%20%20%20%20%20%20%20val%20%3D%20%22%3Cimg%20src%20%3D%20'%22%20%2B%20val.imageLink%20%2B%20%22'%2F%3E%22%E2%80%89%0A%0A%20%20%20%20%20%20%20%20%20%20html%20%3D%20html%20%2B%20%22%3Cdiv%20class%20%3D%20'cat'%3E%22%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Only%20change%20code%20below%20this%20line.%0A%0A%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Only%20change%20code%20above%20this%20line.%0A%0A%20%20%20%20%20%20%20%20%20%20for(var%20key%20in%20val)%7B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20html%20%3D%20html%20%2B%20'%3Cdiv%20class%20%3D%20%22'%20%2B%20key%20%2B%20'%22%3E'%20%2B%20val%5Bkey%5D%20%2B%20'%3C%2Fdiv%3E'%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20html%20%3D%20html%20%2B%20%22%3C%2Fdiv%3E%22%0A%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%E2%80%89%E2%80%89%E2%80%89%E2%80%89%20%20%20%20%24(%22.message%22).html(html)%3B%0A%0A%E2%80%89%E2%80%89%20%20%20%20%7D)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D)%3B%0Afcces%0A%0A%0A%3Cdiv%20class%3D%22container-fluid%22%3E%0A%20%3Cdiv%20class%20%3D%20%22row%20text-center%22%3E%0A%20%20%20%3Ch2%3ECat%20Photo%20Finder%3C%2Fh2%3E%0A%20%3C%2Fdiv%3E%0A%20%3Cdiv%20class%20%3D%20%22row%20text-center%22%3E%0A%20%20%20%3Cdiv%20class%20%3D%20%22col-xs-12%20well%20message%22%3E%0A%20%20%20%20%20The%20message%20will%20go%20here%0A%20%20%20%3C%2Fdiv%3E%0A%20%3C%2Fdiv%3E%0A%20%3Cdiv%20class%20%3D%20%22row%20text-center%22%3E%0A%20%20%20%3Cdiv%20class%20%3D%20%22col-xs-12%22%3E%0A%20%20%20%20%20%3Cbutton%20id%20%3D%20%22getMessage%22%20class%20%3D%20%22btn%20btn-primary%22%3E%0A%20%20%20%20%20%20%20Get%20Message%0A%20%20%20%20%20%3C%2Fbutton%3E%0A%20%20%20%3C%2Fdiv%3E%0A%20%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%0A) has an issue.\r\nUser Agent is: <code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36</code>.\r\nPlease describe how to reproduce this issue, and include links to screenshots if possible.\r\n\r\nMy code:\r\n```html\r\n<script>\r\n  $(document).ready(function() {\r\n\r\n    $(\"#getMessage\").on(\"click\", function() {\r\n      $.getJSON(\"/json/cats.json?callback=\", function( json ) {\r\n\r\n        var html = \"\";\r\n\r\n        json\r\n        .filter(function(val) {\r\n          return (val.id !== 1);\r\n        })\r\n        .map(function(val){\r\n\r\n          val = \"<img src = '\" + val.imageLink + \"'/>\" \r\n\r\n          html = html + \"<div class = 'cat'>\"\r\n\r\n          // Only change code below this line.\r\n\r\n\r\n\r\n          // Only change code above this line.\r\n\r\n          for(var key in val){\r\n\r\n            html = html + '<div class = \"' + key + '\">' + val[key] + '</div>';\r\n\r\n          }\r\n\r\n          html = html + \"</div>\"\r\n\r\n        });\r\n\r\n        $(\".message\").html(html);\r\n\r\n      });\r\n    });\r\n  });\r\n</script>\r\n\r\n\r\n<div class=\"container-fluid\">\r\n <div class = \"row text-center\">\r\n   <h2>Cat Photo Finder</h2>\r\n </div>\r\n <div class = \"row text-center\">\r\n   <div class = \"col-xs-12 well message\">\r\n     The message will go here\r\n   </div>\r\n </div>\r\n <div class = \"row text-center\">\r\n   <div class = \"col-xs-12\">\r\n     <button id = \"getMessage\" class = \"btn btn-primary\">\r\n       Get Message\r\n     </button>\r\n   </div>\r\n </div>\r\n</div>\r\n\r\n\r\n```\r\n\r\nAs you can see I solved the challenge by calling `filter()` outside of the authorized area. "},"comment":{"url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/comments/152269458","html_url":"https://github.com/FreeCodeCamp/FreeCodeCamp/issues/3985#issuecomment-152269458","issue_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/3985","id":152269458,"user":{"login":"ltegman","id":1381313,"avatar_url":"https://avatars.githubusercontent.com/u/1381313?v=3","gravatar_id":"","url":"https://api.github.com/users/ltegman","html_url":"https://github.com/ltegman","followers_url":"https://api.github.com/users/ltegman/followers","following_url":"https://api.github.com/users/ltegman/following{/other_user}","gists_url":"https://api.github.com/users/ltegman/gists{/gist_id}","starred_url":"https://api.github.com/users/ltegman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ltegman/subscriptions","organizations_url":"https://api.github.com/users/ltegman/orgs","repos_url":"https://api.github.com/users/ltegman/repos","events_url":"https://api.github.com/users/ltegman/events{/privacy}","received_events_url":"https://api.github.com/users/ltegman/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T18:09:05Z","updated_at":"2015-10-29T18:09:05Z","body":"This is not an problem. The only reasons the comment guidelines are there is to make it clear that by changing the setup code the user could potentially make the tests fail even if they \"completed\" what the waypoint asked. It's okay if a user can also solve it outside of the designated area :smile:\r\n\r\nClosing as not an issue, but thanks and happy coding!"}}