title: ELM how to decode different value in json array
body: <p>I have a JSON array with different value in the array and I don't know how to parse it. Here is an example:</p>
  
  <pre><code>[
    {
      "firstname": "John",
      "lastname": "Doe",
      "age": 30
    },
    {
      "companyName": "Doe enterprise",
      "location": "NYC",
      "numberOfEmployee": 10
    }
  ]
  </code></pre>
  
  <p>So my JSON is like this, the first element of the array is an user, and the second a company.
  I have the equivalent in Elm:</p>
  
  <pre><code>type alias User =
    { firsname : String
    , lastname : String
    , age : Int
    }
  
  type alias Company =
    { companyName : String
    , location : String
    , numberOfEmployee : Int
    }
  </code></pre>
  
  <p>then: <code>Task.perform FetchFail FetchPass (Http.get decodeData url)</code>.</p>
  
  <p>So how do I get my <code>User</code> and <code>Company</code> pass in my <code>FetchPass</code> function ?
  There is something like <code>Json.Decode.at</code> but it's for object only.
  Here there a way to do something like this ?</p>
  
  <pre><code>decodeData =
    Json.at [0] userDecoder
    Json.at [1] companyDecoder
  </code></pre>