title: How do I get data out of the "data" variable in jQuery and Django
body: <p>I think it goes a little something like this:</p>
  
  <p>In my view:</p>
  
  <pre><code>from django.core import serializers
  </code></pre>
  
  <p>And later....</p>
  
  <pre><code>data = serializers.serialize('json', MODEL.objects.filter(id=id), fields=('points'))
  return HttpResponse(data)
  </code></pre>
  
  <p>In my jQuery:</p>
  
  <pre><code>$.ajaxSetup({
    dataType: "json"
  });
  
  $('#selector .selector_detail a').click(function() {
      var call_to = $(this).attr('href');
  
      $.ajax({
        url: call_to,
        type: "POST",
  
        complete: function() {
            console.log('Ajax Complete')
        },
  
        success: function(data) {
            points = data(fields.points)
            console.log('Ajax Successful')
            console.log(data);
       },
  
        error: function(xhr) {
            console.log('Whoops, something went wrong. XHR Response:' + JSON.stringify(xhr));
        },
      });
  
      return false;
  });
  </code></pre>
  
  <p>I want the value of points, but I have no idea how to get it out. I can see it in the console.log when I look at the data Objects. What am I missing?</p>