title: Golang unmarshal json that starts as an array
body: <p>I'm trying to unmarshal this json <a href="https://www.reddit.com/r/videos/comments/3vgdsb/recruitment_2016.json" rel="nofollow">https://www.reddit.com/r/videos/comments/3vgdsb/recruitment_2016.json</a></p>
  
  <p>It starts as an array of two different objects, and I only need data on the second object.</p>
  
  <p>I want to retrieve the comments body, it doesn't give me any error when i'm trying to decode it, but it doesn't capture the data I want. </p>
  
  <p>This is the output I get from running this:</p>
  
  <pre><code>//Response struct when initialized: []
  //Response struct decoded: [{{{[]}}} {{{[]}}}]
  </code></pre>
  
  <p>////</p>
  
  <pre><code>type Response []struct {
      Parent struct {
          Data struct {
              Children []struct {
                  Com Comment
              }
          }
      }
  }
  
  type Comment struct {
      Name string `json:"body"`
  }
  
  func init() {
      http.HandleFunc("/api/getcomments", getComments)
  }
  
  func getComments(w http.ResponseWriter, r *http.Request) {
  
      url := "https://www.reddit.com/r/videos/comments/3vgdsb/recruitment_2016.json"
      c := appengine.NewContext(r)
      client := urlfetch.Client(c)
      resp, err := client.Get(url)
      if err != nil { fmt.Fprint(w, "Error client.Get(): ", err) }
  
      re := new(Response)
      fmt.Fprint(w, "Response struct: ", re, "\n")
  
      errTwo := json.NewDecoder(resp.Body).Decode(&amp;re)
      if errTwo != nil {  fmt.Fprint(w, "Error decoding: ", errTwo, "\n") }
  
      fmt.Fprint(w, "Response struct: ", re)
  }
  </code></pre>