title: How can I write an array of maps [golang]
body: <p>I have a map which has as value an array of maps.</p>
  
  <p>Example: </p>
  
  <pre><code> thisMap["coins"][0] = aMap["random":"something"]
   thisMap["notes"][1] = aMap["not-random":"something else"]
   thisMap["coins"][2] = aMap["not-random":"something else"]
  </code></pre>
  
  <p>I can't figure it out how to do this as <code>go</code> seems to allow setting data only at one level when you deal with <code>maps [name][value] = value</code>.</p>
  
  <p>So far I have this code which fails</p>
  
  <pre><code>package main
  
  func main() {
  
      something := []string{"coins", "notes", "gold?", "coins", "notes"}
  
      thisMap := make(map[string][]map[string]int)
  
      for k, v := range something {
          aMap := map[string]string{
              "random": "something",
          }
  
          thisMap[v] = [k]aMap
      }
  }
  </code></pre>
  
  <p><strong>Edit</strong>: The slice values ("coins", "notes" etc )  can repeat so this is the reason why I need  use an index <code>[]</code> . </p>