Ajax通话数据问题

I have data from an ajax call like so:

[ { "id": "1", "name": "Jim", "age": "39", "address": "12 High Street, London", "hasCar": "1", "speaksForeignLanguage": "1", "canWorkNights": "1", "isStudent": "1" }, { "id": "2", "name": "Fred", "age": "29", "address": "13 High Street, London", "hasCar": "1", "speaksForeignLanguage": "1", "canWorkNights": "1", "isStudent": "0" }, { "id": "3", "name": "Bill", "age": "19", "address": "14 High Street, London", "hasCar": "1", "speaksForeignLanguage": "1", "canWorkNights": "0", "isStudent": "0" }, { "id": "4", "name": "Tom", "age": "39", "address": "15 High Street, London", "hasCar": "1", "speaksForeignLanguage": "0", "canWorkNights": "0", "isStudent": "0" }, { "id": "5", "name": "Cathy", "age": "29", "address": "16 High Street, London", "hasCar": "1", "speaksForeignLanguage": "0", "canWorkNights": "0", "isStudent": "1" }, { "id": "6", "name": "Petra", "age": "19", "address": "17 High Street, London", "hasCar": "1", "speaksForeignLanguage": "0", "canWorkNights": "1", "isStudent": "0" }, { "id": "7", "name": "Heide", "age": "39", "address": "18 High Street, London", "hasCar": "1", "speaksForeignLanguage": "1", "canWorkNights": "0", "isStudent": "0" }, { "id": "8", "name": "William", "age": "29", "address": "19 High Street, London", "hasCar": "1", "speaksForeignLanguage": "1", "canWorkNights": "0", "isStudent": "1" }, { "id": "9", "name": "Ted", "age": "19", "address": "20 High Street, London", "hasCar": "0", "speaksForeignLanguage": "0", "canWorkNights": "0", "isStudent": "1" }, { "id": "10", "name": "Mike", "age": "19", "address": "21 High Street, London", "hasCar": "1", "speaksForeignLanguage": "0", "canWorkNights": "0", "isStudent": "1" }, { "id": "11", "name": "Jo", "age": "19", "address": "22 High Street, London", "hasCar": "0", "speaksForeignLanguage": "1", "canWorkNights": "0", "isStudent": "1" } ]

what I am trying to do with this data is draw out a div element but I just want specific data information for what I am trying to draw out.

function makeTable(data){
       var tbl_body = "";
          $.each(data, function() {
            $.each(this, function(k , v) {
                console.log(v.age);
              tbl_body += "<spam>"+v.age+"</spam>";      
            })
          })

        return tbl_body;
      }

but it says v.age in undefined :(

here is my ajax call:

function updateEmployees(opts){
        $.ajax({
          type: "POST",
          url: "submit.php",
          dataType : 'json',
          cache: false,
          data: {filterOpts: opts},
          success: function(records){
            $('#listings').html(makeTable(records));
          }
        });
      }

how would I get just the age, in this example?

You are using two each functions.. why is that? You are iterating inside the object properties.. in this case you don't need that.. Try this one:

function makeTable(data){
   var tbl_body = "";
      $.each(data, function() {
          console.log(this.age);
          tbl_body += "<span>"+this.age+"</span>";      
      })

    return tbl_body;
}

Also note that I changed the <spam> to <span> .. You wrote it wrong, and I don't know what are you trying to do, but this won't make any table. Ask if you help on this.