title: How to parse json array struct
body: <p>I'm using the following code without success to parse json value but its inside array []</p>
  <p><a href="https://play.golang.org/p/5HdWeyEtvie" rel="noreferrer">https://play.golang.org/p/5HdWeyEtvie</a></p>
  <pre><code>package main
  
  import (
      &quot;encoding/json&quot;
      &quot;fmt&quot;
  )
  
  
  var input = `
  [
  {
      &quot;created_at&quot;: &quot;Thu May 31 00:00:01 +0000 2012&quot;
  },
  {
      &quot;created_at&quot;: &quot;Thu May 31 00:00:01 +0000 2012&quot;
  }
  ]
  `
  
  func main() {
      var val map[string]interface{}
      if err := json.Unmarshal([]byte(input), &amp;val); err != nil {
          panic(err)
      }
      fmt.Println(val)
  }
  </code></pre>
  <p>The idea is to get the value as key and print it , like a function that get string parameter=&quot;created_at&quot; and prints it.</p>