title: Angular Getting Value from Object Object
body: <p>I would like to extract the value from the JSON below  (resReturn.result.gamingdata.original.success)</p>
  
  <p>Just wonder why I can get the value only if I do several times of stringify and parse.</p>
  
  <p>Can someone tell me how to simplify my code?</p>
  
  <p>JSON:</p>
  
  <pre><code>{
      "status":"Success",
      "message":"100",
      "resReturn":
      {
          "result":{
              "gamingdata":
              {
                      "headers":{},
                      "original":{"success":"Gaming Data Excel - upload success"},
                      "exception":null
              }
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>My Code:</p>
  
  <pre><code>          let resReturnJSON = JSON.stringify(this.UploadstatusGamingDataExcel.resReturn);
            let resultobj = JSON.parse(resReturnJSON || '{}').result;
            let resultJSON = JSON.stringify(resultobj);
            let gamingdataobj = JSON.parse(resultJSON || '{}').gamingdata;
            let gamingdataJSON = JSON.stringify(gamingdataobj);
            let originalObj = JSON.parse(gamingdataJSON || '{}').original;
            let originalJSON = JSON.stringify(originalObj);
            let successObj = JSON.parse(originalJSON || '{}').success;
            console.log(successObj);
  </code></pre>