{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/Argo/issues/166","labels_url":"https://api.github.com/repos/thoughtbot/Argo/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/Argo/issues/166/comments","events_url":"https://api.github.com/repos/thoughtbot/Argo/issues/166/events","html_url":"https://github.com/thoughtbot/Argo/issues/166","id":94181595,"number":166,"title":"Is there a way to parse two dimensional arrays?","user":{"login":"lfrahm","id":8446438,"avatar_url":"https://avatars.githubusercontent.com/u/8446438?v=3","gravatar_id":"","url":"https://api.github.com/users/lfrahm","html_url":"https://github.com/lfrahm","followers_url":"https://api.github.com/users/lfrahm/followers","following_url":"https://api.github.com/users/lfrahm/following{/other_user}","gists_url":"https://api.github.com/users/lfrahm/gists{/gist_id}","starred_url":"https://api.github.com/users/lfrahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfrahm/subscriptions","organizations_url":"https://api.github.com/users/lfrahm/orgs","repos_url":"https://api.github.com/users/lfrahm/repos","events_url":"https://api.github.com/users/lfrahm/events{/privacy}","received_events_url":"https://api.github.com/users/lfrahm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-10T00:28:33Z","updated_at":"2016-01-18T14:53:02Z","closed_at":"2015-08-21T13:23:42Z","body":"Hey there!\r\n\r\nFirst of all thanks for providing such a convenient way of transforming JSON data into models! It is super helpful. \r\n\r\nBut I'm wondering how I can parse more-dimensional arrays. I can't just wrap it into a new model since the deeper JSON text doesn't have a field, and unfortunately there is no <||| operator.\r\n\r\nSo is there a way to parse something like:\r\n```{\r\n    \"data\":[\r\n        [0,1],\r\n        [2,3],\r\n        [4,5]\r\n    ]\r\n}```"},"comment":{"url":"https://api.github.com/repos/thoughtbot/Argo/issues/comments/172550443","html_url":"https://github.com/thoughtbot/Argo/issues/166#issuecomment-172550443","issue_url":"https://api.github.com/repos/thoughtbot/Argo/issues/166","id":172550443,"user":{"login":"ulrichzoltan","id":3006581,"avatar_url":"https://avatars.githubusercontent.com/u/3006581?v=3","gravatar_id":"","url":"https://api.github.com/users/ulrichzoltan","html_url":"https://github.com/ulrichzoltan","followers_url":"https://api.github.com/users/ulrichzoltan/followers","following_url":"https://api.github.com/users/ulrichzoltan/following{/other_user}","gists_url":"https://api.github.com/users/ulrichzoltan/gists{/gist_id}","starred_url":"https://api.github.com/users/ulrichzoltan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulrichzoltan/subscriptions","organizations_url":"https://api.github.com/users/ulrichzoltan/orgs","repos_url":"https://api.github.com/users/ulrichzoltan/repos","events_url":"https://api.github.com/users/ulrichzoltan/events{/privacy}","received_events_url":"https://api.github.com/users/ulrichzoltan/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T14:53:02Z","updated_at":"2016-01-18T14:53:02Z","body":"Hi there,\r\n\r\nI ran into the same problem of modeling two dimensional arrays. I tried out the above suggestions, as follows, but with the current version of the library (2.2.0) the compilation fails.\r\n\r\n```swift\r\nstruct Matrix {\r\n    let data: [[Int]]\r\n}\r\n\r\nimport Curry\r\nimport Argo\r\n\r\nextension Matrix : Decodable {\r\n    static func decode(j: JSON) -> Decoded<Matrix> {\r\n        return curry(Matrix.init) <^>\r\n            (j <|| \"data\" >>- { sequence(decode <^> $0) })\r\n    }\r\n}\r\n```\r\n\r\nThe compiler says:\r\n> Matrix.swift:24:29: error: cannot convert value of type '(data: [[Int]]) -> Matrix' to expected argument type '(_) -> _'\r\n\r\nWhat would be the way to do it with the latest version?\r\n\r\nThank you."}}