title: how to convert map[string]interface{} data to struct
body: <p>I do not know how to ask, so i will ask with an example.</p>
  <p>I have some data like that</p>
  <pre class="lang-json prettyprint-override"><code>{
  ..
      &quot;velocityStatEntries&quot;:  {
  
      &quot;8753&quot;:  {
  
          &quot;estimated&quot;:  {&quot;value&quot;:  23.0,&quot;text&quot;:  &quot;23.0&quot;},
  
          &quot;completed&quot;:  {&quot;value&quot;:  27.0,&quot;text&quot;:  &quot;27.0&quot;}
      },
  
      &quot;8673&quot;:  {
  
          &quot;estimated&quot;:  {&quot;value&quot;:  54.5,&quot;text&quot;:  &quot;54.5&quot;},
  
          &quot;completed&quot;:  {&quot;value&quot;:  58.5,&quot;text&quot;:  &quot;58.5&quot;}
      },
      .
      .
      .
  
      }
  ..
  }
  </code></pre>
  <p>I want to declare a type that takes map key to its &quot;KEY&quot; or any property that is given by me.
  Is it possible without using map iteration?</p>
  <p>Expected output:</p>
  <pre class="lang-json prettyprint-override"><code>{...
     &quot;velocityStatEntries&quot;: {
     {
       &quot;key&quot;: &quot;8753&quot;,
       &quot;estimated&quot;:  {&quot;value&quot;:  54.5,&quot;text&quot;:  &quot;54.5&quot;},
       &quot;completed&quot;:  {&quot;value&quot;:  58.5,&quot;text&quot;:  &quot;58.5&quot;}
     },
     {
       &quot;key&quot;: &quot;8673&quot;,
       &quot;estimated&quot;:  {&quot;value&quot;:  54.5,&quot;text&quot;:  &quot;54.5&quot;},
       &quot;completed&quot;:  {&quot;value&quot;:  58.5,&quot;text&quot;:  &quot;58.5&quot;}
     },
    }
  ...
  }
  </code></pre>
  <p>This is what i have done</p>
  <pre class="lang-golang prettyprint-override"><code>type VelocityStatEntry struct {
      Key string
      Estimated struct {
          Value float64 `json:&quot;value&quot;`
          Text  string  `json:&quot;text&quot;`
      } `json:&quot;estimated&quot;`
      Completed struct {
          Value float64 `json:&quot;value&quot;`
          Text  string  `json:&quot;text&quot;`
      } `json:&quot;completed&quot;`
  }
  
  type RapidChartResponse struct {
      ...
      VelocityStatEntries map[string]VelocityStatEntry `json:&quot;velocityStatEntries&quot;`
      ..
  }
  </code></pre>
  <p>But it is not working. I want to take that string map key to KEY property.</p>