title: How to create array of objects - Go?
body: <p>I am working in <code>Go</code> and <code>MongoDB</code> and having the following MongoDB schema </p>
  
  <pre><code>[   
    {
      "name":"sample",
      "time": "2014-04-05",
      "Qty":3
    },
    {
     "name":"sample",
     "time": "2014-04-05",
     "Qty":3
    }
  ]
  </code></pre>
  
  <p>I had tried using the following code to create the above document</p>
  
  <pre><code>elements := make([3]map[string]string)
  elements["name"] = "karthick"
  elements["date"] = "2014-04-05"
  elements["qty"] = 3
  
  fmt.Println(elements)
  </code></pre>
  
  <p>But it is not working.</p>
  
  <pre><code>Error : cannot make type [3]map[string]string
  </code></pre>
  
  <p>Any suggestion will be grateful</p>