title: jQuery: How to replace content with JSON response
body: <p>I am having difficulty replacing the content of an HTML element with a JSON object property.  Here's my code:</p>
  
  <pre><code>url  = '/blah/blah-blah';
  data = $.getJSON(url);
  $(this).parent('.status').replaceWith(data.content);
  </code></pre>
  
  <p>Now, I know that the correct JSON object is being returned and that it includes a properly formatted property called 'content'.  (I am displaying it in the console).  Secondly, I know that I am selecting the correct element to replace.  (If I replace <code>data.content</code> with 'bingo!' I see the text displayed on screen.)</p>
  
  <p>When I run the code above, however, I see the content of my element replaced with nothing.  What am I doing wrong?</p>
  
  <p>Note that I tried replacing <code>data.content</code> with <code>data.responseJSON.content</code>, but that didn't help.</p>
  
  <p>Thanks!</p>