title: Multi-level Unmarshall JSON with changing key values
body: <p>I've seen a few posts like <a href="https://stackoverflow.com/questions/38794336/golang-unmarshall-json-with-changing-key-value">this one</a> that address the issue of unmarshalling on different keys. However, I seem to have a hard time figuring out how to do it when I have multiple layers. </p>
  
  <p>Here is what I'd like to unmarshall:</p>
  
  <p><code>{"chainlink":{"usd":3.75}}</code>
  However both <code>chainlink</code> and <code>usd</code> could be different.</p>
  
  <p>My current approach looks like this:</p>
  
  <pre><code>type cryptoCurrency struct {
      Currency cryptoCurrencyResult `json: "chainlink,JPY,gold,apple"`
  }
  
  type cryptoCurrencyResult struct {
      Usd float64 `json: "usd,USDT,peso"`
  }
  </code></pre>
  
  <p>(the above is obviously wrong)</p>
  
  <p>And then using them:</p>
  
  <pre><code>var crypto cryptoCurrency
  json.Unmarshal(data, &amp;crypto)
  </code></pre>
  
  <p>But again, the data could look anything like:</p>
  
  <pre><code>{"chainlink":{"usd":3.75}}
  {"JPY":{"USDT":1000}}
  {"gold":{"peso":100}}
  {"apple":{"usd":1.35}}
  </code></pre>
  
  <p>The current solutions on SO seem to be towards single level unmarshalling.</p>