title: How to parse JSON array in Go
body: <p>How to parse a string (which is an array) in Go using json package?</p>
  <pre class="lang-golang prettyprint-override"><code>type JsonType struct{
      Array []string
  }
  
  func main(){
      dataJson = `[&quot;1&quot;,&quot;2&quot;,&quot;3&quot;]`
      arr := JsonType{}
      unmarshaled := json.Unmarshal([]byte(dataJson), &amp;arr.Array)
      log.Printf(&quot;Unmarshaled: %v&quot;, unmarshaled)
  }
  </code></pre>