I'm trying to successfully pass the result to another function and it's simply returning an undefined value:
function tagCustomer(email, tags) {
   var o = new Object();
   o.tags = tags;
   o.email = email;
   o.current_tags = getCustomerTags(email);
   o.new_tags = tags;
   console.log(o);
   return true;
}
function returnData( data ) {
    return data;
}
function getCustomerTags(email) {
   $.ajax({
      url: "xxx.io/index.php",
      type: "POST",
      dataType: "json",
      data: {email: email, "action": "getCustomerTags"},
      contentType: "application/x-www-form-urlencoded; charset=utf-8",
      success: function (data) {
      returnData( data );
         return data;
      }     
   });
}
o.current_tags should get the result of getCustomerTags.
 
     
     
     
    