{"action":"created","issue":{"url":"https://api.github.com/repos/iu2fish/iu2fish.github.com/issues/42","labels_url":"https://api.github.com/repos/iu2fish/iu2fish.github.com/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/iu2fish/iu2fish.github.com/issues/42/comments","events_url":"https://api.github.com/repos/iu2fish/iu2fish.github.com/issues/42/events","html_url":"https://github.com/iu2fish/iu2fish.github.com/issues/42","id":84064265,"number":42,"title":"数组去重排序，多维数组降维","user":{"login":"iu2fish","id":2611161,"avatar_url":"https://avatars.githubusercontent.com/u/2611161?v=3","gravatar_id":"","url":"https://api.github.com/users/iu2fish","html_url":"https://github.com/iu2fish","followers_url":"https://api.github.com/users/iu2fish/followers","following_url":"https://api.github.com/users/iu2fish/following{/other_user}","gists_url":"https://api.github.com/users/iu2fish/gists{/gist_id}","starred_url":"https://api.github.com/users/iu2fish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iu2fish/subscriptions","organizations_url":"https://api.github.com/users/iu2fish/orgs","repos_url":"https://api.github.com/users/iu2fish/repos","events_url":"https://api.github.com/users/iu2fish/events{/privacy}","received_events_url":"https://api.github.com/users/iu2fish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-02T15:05:55Z","updated_at":"2015-06-02T16:00:18Z","closed_at":null,"body":"<pre>\r\nArray.prototype.unique3 = function(){\r\n\tvar res = [];\r\n\tvar json = {};\r\n\tfor(var i = 0; i < this.length; i++){\r\n\t\tif(!json[this[i]]){\r\n\t\t\tres.push(this[i]);\r\n\t\t\tjson[this[i]] = 1;\r\n\t\t}\r\n\t}\r\n\treturn res;\r\n}\r\n\r\nvar arr = [112,112,34,'你好',112,112,34,'你好','str','str1'];\r\nalert(arr.unique3());\r\n</pre>"},"comment":{"url":"https://api.github.com/repos/iu2fish/iu2fish.github.com/issues/comments/108000632","html_url":"https://github.com/iu2fish/iu2fish.github.com/issues/42#issuecomment-108000632","issue_url":"https://api.github.com/repos/iu2fish/iu2fish.github.com/issues/42","id":108000632,"user":{"login":"iu2fish","id":2611161,"avatar_url":"https://avatars.githubusercontent.com/u/2611161?v=3","gravatar_id":"","url":"https://api.github.com/users/iu2fish","html_url":"https://github.com/iu2fish","followers_url":"https://api.github.com/users/iu2fish/followers","following_url":"https://api.github.com/users/iu2fish/following{/other_user}","gists_url":"https://api.github.com/users/iu2fish/gists{/gist_id}","starred_url":"https://api.github.com/users/iu2fish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iu2fish/subscriptions","organizations_url":"https://api.github.com/users/iu2fish/orgs","repos_url":"https://api.github.com/users/iu2fish/repos","events_url":"https://api.github.com/users/iu2fish/events{/privacy}","received_events_url":"https://api.github.com/users/iu2fish/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T16:00:18Z","updated_at":"2015-06-02T16:00:18Z","body":"<pre>\r\nArray.prototype.unique1 = function(){\r\n\tvar res = [this[0]];\r\n\tfor(var i = 1; i < this.length; i++){\r\n\t\tvar repeat = false;\r\n\t\tfor(var j = 0; j < res.length; j++){\r\n\t\t\tif(this[i] == res[j]){\r\n\t\t\t\trepeat = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(!repeat){\r\n\t\t\tres.push(this[i]);\r\n\t\t}\r\n\t}\r\n\treturn res;\r\n}\r\nvar arr = [1, 'a', 'a', 'b', 'd', 'e', 'e', 1, 0]\r\nalert(arr.unique1());\r\n</pre>"}}