title: Merge Maps in Golang
body: <p>I need to merge multiple maps <code>map1 = [ id: id_1 val: val_1 ]</code>, <code>map2 = [ id: id_2 val: val_2 ]</code> and  <code>map3 = [id: id_1, val: val_3]</code> such that the result map should be merged on the <code>id</code> values:</p>
  
  <pre><code>result_map = [id: id_1 val: {val_1, val_3}, id: id_2 var: {val_2}} ]
  </code></pre>
  
  <p>The code I've tried:</p>
  
  <pre><code>var a = make(map[string]interface{})
  for _, m := range data {
      for _, n := range data {
          if m["id"] == n["id"] {
              for l, k := range n {
                  c[l] = k
              }
          }
      }
  }
  </code></pre>
  
  <p>Is there a way this can be done? Am using Golang 1.7</p>
  
  <p>Thanks</p>