title: unmarshall json using dynamic key
body: <p>I'm receiving a <code>json</code> object that has a known-static structure inside a key that varies between 10 different values.</p>
  <p>Consider <code>lastname</code> can be any in a list of 10 lastnames:</p>
  <pre><code>var lastnames = [...]string { &quot;Smith&quot;, &quot;Johnson&quot;, &quot;Williams&quot;, &quot;Brown&quot;, &quot;Jones&quot;, &quot;Miller&quot;, &quot;Davis&quot;, &quot;Garcia&quot;, &quot;Rodriguez&quot;, &quot;Wilson&quot; }
  </code></pre>
  <p>Now, this is how the <code>json</code> looks:</p>
  <pre><code>{ 
    (lastname here): 
      {
          &quot;position&quot;: value,
          &quot;user_email&quot;: value
      }
  }
  </code></pre>
  <p>I tried to unmarshall it using the following structs, but I only get null values:</p>
  <pre><code>type Inside struct {
      Rol   string   `json:&quot;position&quot;`
      Email   string   `json:&quot;user_email&quot;`
  }
  
  type Outside struct {
      Key Inside
  }
  
  ...
  var outside Outside
  json.Unmarshal([]byte(body), &amp;outside)
  </code></pre>
  <p>Is it possible to unmarshall this directly without creating 10 different structs? Is there possible workaround?</p>