title: How to get data from JSON response?
body: <p>I am using plain JavaScript on my project. How can I get the value of the following example with the category? I need to detect whether it comes back true or false.</p>
  
  <pre><code>{
      "category": "true"
  }
  </code></pre>
  
  <p>I can get the entire object, but I just want to pull out the value of category.</p>
  
  <hr>
  
  <p><em>from comment...</em></p>
  
  <blockquote>
    <p>The JSON data is returned from the server based on a form submission. It keeps saying myObject is undefined. How can do I pass this so my JavaScript can read the response?</p>
  </blockquote>
  
  <p><em>from comment...</em></p>
  
  <blockquote>
    <p>I can get myObject using this: <code>if (form.XHR.status === 200) {var data = form.XHR.response;}</code>, but if I try to do <code>data.myObject</code> it says it's undefined.</p>
  </blockquote>