title: cannot unmarshal array into Go struct when decoding array
body: <p>I'm trying to properly decode JSON String to an object.</p>
  
  <p>I defined the following structs:</p>
  
  <pre><code>type AjaxModelsList struct {
      Id float64 `json:"Id"`
      Name string `json:"Name"`
      CarId float64 `json:"CarId"`
      EngName string `json:"EngName"`
  }
  
  type AjaxModelsData struct {
      ModelList []AjaxModelsList `json:"ModelList"`
  }
  
  type AjaxModels struct {
      Status bool `json:"status"`
      Data map[string]AjaxModelsData `json:"data"`
  
  }
  </code></pre>
  
  <p>the defined object is </p>
  
  <pre><code>{
   "status": true,
   "data": {
   "ModelList": [{
     "Id": 1,
     "Name": "foo",
     "CarId": 1,
     "EngName": "bar"
    }]
   }
  }
  </code></pre>
  
  <p>and I unmarshall using the following code:</p>
  
  <pre><code>c :=AjaxModels{}
  if err := json.Unmarshal(body_byte,&amp;c); err != nil {
      log.Fatalf("an error occured: %v",err)
  }
  </code></pre>
  
  <p>and I get the following output:</p>
  
  <pre><code>an error occured: json: cannot unmarshal array into Go struct field AjaxModels.data of type main.AjaxModelsData
  </code></pre>
  
  <p>since I used <code>[]AjaxModelsList</code> it's a slice so I shouldn't be getting this error. I probably missed something, but what ?</p>