title: jquery ajax call returns object, how to get object value
body: <p>So our programmer did an AJAX call that returns an object. I don't have a clue how to append the data it return to an element. Any help is appreciated.</p>
  
  <p>AJAX CALL</p>
  
  <pre><code>$('.submit_btn').unbind('click').bind('click', function(e) {
      e.preventDefault();
  
      $.ajax({
          type: "POST",
          url: $(this).data('url'),
          data: {
              csrfmiddlewaretoken: $(this).data('csrf')
          },
          success: function(data) {
              console.log('success');
              console.log(data);
          },
          error: function(ret) {
              var data = JSON.parse(ret.responseText);
              console.log('error');
              console.log(data);
          },
      });
  });
  </code></pre>
  
  <p>After clicking the submit button, I get in the console "success" and:</p>
  
  <pre><code>Object {409: "Response message"} or Object {201: "Response message"}
  </code></pre>
  
  <p>And i should append the response message to an element. How can i access the response message?</p>