Elm: How to decode data from JSON API
I have this data using http://jsonapi.org/ format: { "data": [ { "type": "prospect", "id": "1", "attributes": { "provider_user_id": "1", "provider": "facebook", "name": "Julia", "invitation_id": 25 } }, { "type": "prospect", "id": "2", "attributes": { "provider_user_id": "2", "provider": "facebook", "name": "Sam", "invitation_id": 23 } } ] } I have my models like: type alias Model = { id: Int, invitation: Int, name: String, provider: String, provider_user_id: Int } type alias Collection = List Model I want to decode the json into a Collection, but don't know how. fetchAll: Effects Actions