title: How to loop through a simple JSON object in Javascript
body: <p>Okay, so i'm aware there are similar questions on this on the site BUT all I have seen have people with an array INSIDE an array. So I'm just looking for a bit of help on a simple one that I just can't seem to grasp.</p>
  
  <p>The JSON is being generated from a PHP file and looks something like this when retrieved via AJAX: <code>{'name' : 'Derick', 'email' : 'email@example.com'}</code>.</p>
  
  <p>How can I loop through this response, using Javascript, to retrieve the value for, say, the 'name' key in the array?</p>
  
  <p>code snippet:</p>
  
  <pre><code>response = {'name' : 'Derick', 'email' : 'email@example.com'};
  </code></pre>