Returning value from async function in NodeJS

I'm trying to get back query data in JSON from my serverside code running on Node.JS

Here is my clientside AJAX request:

$(function() {
  var values = $(this).serialize();
  $.ajax({
    url: '/querySearch',
    type: 'post',
    data: values,
    success: function(msg){
      console.log(msg);
    },
    error: function(){
      alert('failure');
    }
  });
});

My serserside code:

app.post('/querySearch', function(req, res) {
  var queryNumber = Number(req.body.queryNumber);
  if (queryNumber == 1){
    executeQuery1(res, sendQueryResults);
  }
  else if (queryNumber == 4){
    executeQuery4(res, sendQueryResults);
  }
  else if (queryNumber == 6){
    executeQuery6(res, sendQueryResults);
  }
  else if (queryNumber == 7){
    executeQuery7(res, sendQueryResults);
  }
});

function executeQuery1(res, callback) {
    var query = "" +
    'query string';
    service.oneshotSearch(query, {}, function(err, results) {
      if (err) {
        console.log(err);
        alert("An error occurred with the search");
        return;
      }
    callback(res, results);
    });
  });

} 

function sendQueryResults(res, results) {
  res.json(JSON.stringify(results));
  res.end();
}

However, at the moment, my webpage won't even finish loading. What am I doing wrong?

You need to call res.end() after your have written your data in.

Well, one issue I see might be a problem is that res.json accepts an object and you're passing a string. Try:

res.json(results);

or just res.send:

res.send(JSON.stringify(results));

or I think this would work as well

res.send(results);

All three shouldh have the same result.