title: AngularJS: read response data from server
body: <p>I have a problem which should be wasy to solve, but I just cant figure out what I am doing wrong. I receive <code>data</code> through an <code>$http</code> request.</p>
  
  <pre><code>alert(data)
  </code></pre>
  
  <p>gives me <code>object object</code></p>
  
  <pre><code>alert(data.response)
  </code></pre>
  
  <p>gives me <code>{"id":"123456","post_id":"12345"}</code></p>
  
  <pre><code>alert (data.response.id)
  </code></pre>
  
  <p>gives me <code>undefined</code></p>
  
  <p>My question: I want to get the ID. <strong>Why does the last expression give me undefined and not the ID?</strong> Do I have to transform the data in some way?</p>
  
  <p>I am thankful for any hints!</p>