title: Json Unmarshaling in Golang
body: <p>I want to unmarshal the followng json in golang. I am not able to access the inner data .
  What is the best way to do it?</p>
  <pre><code>{
    &quot;1&quot;: {
      &quot;enabled&quot;: 1,
      &quot;pct&quot;: 0.5
    },
    &quot;2&quot;: {
      &quot;enabled&quot;: 1,
      &quot;pct&quot;: 0.6
    },
    &quot;3&quot;: {
      &quot;enabled&quot;: 1,
      &quot;pct&quot;: 0.2
    },
    &quot;4&quot;: {
      &quot;enabled&quot;: 1,
      &quot;pct&quot;: 0.1
    }
  }
  </code></pre>
  <p>I use</p>
  <pre><code>type regs struct {
          enabled bool    `json:&quot;enabled,omitempty&quot;`
          pct     float64 `json:&quot;pct,omitempty&quot;`
      }
  
  var r map[string]regs
  if err := json.Unmarshal([]byte(jStr), &amp;r); err != nil {
      log.Fatal(err)
  }
  fmt.Printf(&quot;%+v\n&quot;, r)
  </code></pre>
  <p>but i dont see the values inside the struct.
  Result: <code>map[1:{enabled:false pct:0} 2:{enabled:false pct:0} 3:{enabled:false pct:0} 4:{enabled:false pct:0}]</code></p>