{"action":"closed","issue":{"url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/674","repository_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON","labels_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/674/labels{/name}","comments_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/674/comments","events_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/674/events","html_url":"https://github.com/SwiftyJSON/SwiftyJSON/issues/674","id":181272348,"number":674,"title":"Iterating through JSON","user":{"login":"travisday","id":14930262,"avatar_url":"https://avatars.githubusercontent.com/u/14930262?v=3","gravatar_id":"","url":"https://api.github.com/users/travisday","html_url":"https://github.com/travisday","followers_url":"https://api.github.com/users/travisday/followers","following_url":"https://api.github.com/users/travisday/following{/other_user}","gists_url":"https://api.github.com/users/travisday/gists{/gist_id}","starred_url":"https://api.github.com/users/travisday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisday/subscriptions","organizations_url":"https://api.github.com/users/travisday/orgs","repos_url":"https://api.github.com/users/travisday/repos","events_url":"https://api.github.com/users/travisday/events{/privacy}","received_events_url":"https://api.github.com/users/travisday/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-05T21:36:33Z","updated_at":"2016-10-07T12:17:55Z","closed_at":"2016-10-07T12:17:55Z","body":"I made a little JSON file to test\r\n`var json: JSON =  [\"name\": \"Jack\", \"name\": \"Travis\"]`\r\n\r\nand I want to append each name to my Array that feeds into a table view.\r\n\r\nthis works to load one key to the table\r\n```\r\n\r\nif let name = json[\"name\"].string {\r\n            self.shows.append(Show(name: name))\r\n            \r\n        } else {\r\n            print(json[\"name\"].error)\r\n        }\r\n```\r\n\r\nbut eventually I want to be able to add large json files with lots of names so I attempted to loop.\r\n\r\n```\r\nif let name = json[\"name\"].string {\r\n            for name in json {\r\n                self.shows.append(Show(name: name))\r\n            }\r\n        }else {\r\n                print(json[\"name\"].error)\r\n}\r\n```\r\n\r\nHowever I get an error on the `self.shows.append(Show(name: name))` line \r\n`Cannot Conver value of type '(String,JSON)' to expected arguement type 'String'`"}}
{"actor":{"display_login":"zhigang1992"}}