title: Parsing JSON response by title - shows output
body: <p>I have implemented the following post to the yotpo api (simple enough post request)</p>
  
  <pre><code>var xhr = new XMLHttpRequest();
  xhr.open('POST', 'https://yotpoapi.apiary.io/oauth/token');
  xhr.setRequestHeader("Content-Type", "application/json");
  xhr.onreadystatechange = function () {
    if (this.readyState == 4) {
      if (typeof cb !== "undefined") {
        cb(this);
      }
      else {
        alert(this.responseText);
      }
    }
  };
  xhr.send("{\n   \"client_id\": \"CLIENT ID\",\n   \"client_secret\": \"CLIENT SECRET KEY\",\n   \"grant_type\": \"client_credentials\"\n}");
  </code></pre>
  
  <p>The response is the following (JSON format)</p>
  
  <pre><code>{
  "access_token": "DUGKea0thVDL2muWzMAd7mYlkni46cJWhiX9tGTF"
  "token_type": "bearer"
  }
  </code></pre>
  
  <p>How can i get rid of everything but the access token response so it gives me the following: <code>DUGKea0thVDL2muWzMAd7mYlkni46cJWhiX9tGTF</code> in a variable.</p>
  
  <p>Sorry i was posting the response in an alert format because i wanted to see in realtime what it was.</p>