title: Accessing Nested Map of Type map[string]interface{} in Golang
body: <p>So I'm trying to parse a JSON response. It can be multiple levels deep. This is what I did:</p>
  
  <pre><code>var result map[string]interface{}
  json.Unmarshal(apiResponse, &amp;result)
  </code></pre>
  
  <p><strong>Firstly, is this the right way to do it?</strong></p>
  
  <p>Lets say the response was as follows:</p>
  
  <pre><code>{
    "args": {
              "foo": "bar"
            }
  }
  </code></pre>
  
  <p>To access key <code>foo</code>, I saw a <a href="http://play.golang.org/p/D2cz2Af4vE" rel="noreferrer">playground</a> doing this:</p>
  
  <pre><code>result["args"].(map[string]interface{})["foo"]
  </code></pre>
  
  <p>Here, what is the <code>.()</code> notation? Is this correct?</p>