title: Golang how to fetch specific key (from multistructure) from the rest api json response
body: <p>Required json specific key: <code>status -&gt; name</code> and <code>id</code> values only</p>
  
  <pre><code>getUrl := "https://www.test.com" 
  
  reqTransitionID, err := http.NewRequest("GET", getUrl, nil)
  
  respTransitionID, err := client.Do(reqTransitionID)
  
  if err != nil {
      log.Fatal(err)
  }
  defer respTransitionID.Body.Close()
  
  type Statuskey struct {
      Id   string `json:"id"`
      Name string `json:"name"`
  }
  
  type TransitionID struct {
      Status Statuskey `json:"status"`
  }
  
  jsonData, errrr := ioutil.ReadAll(respTransitionID.Body)
  if errrr != nil {
      fmt.Println("Error reading JSON data:", errrr)
      return
  }
  
  fmt.Println(string(jsonData))
  var ss TransitionID
  json.Unmarshal(jsonData, &amp;ss)
  fmt.Println(ss.Status)
  fmt.Println(ss.Status.Id)
  fmt.Println(ss.Status.Name)
  </code></pre>
  
  <p>My Json response is :</p>
  
  <pre><code>{  
     "expand":"demo",
     "id":"825",
     "self":"TEST",
     "key":"TEST",
     "fields":{  
        "status":{  
           "self":"tst",
           "description":"test",
           "iconUrl":"test",
           "name":"Closed",
           "id":"6",
           "statusCategory":{  
              "self":"test",
              "id":3,
              "key":"done",
              "colorName":"green",
              "name":"Done"
           }
        }
     }
  }
  </code></pre>