Since you're relying on the buttons being clicked rather than just the form being submitted bind the action to the buttons. As $(this)
in function(){}
is the clicked button you can its details to formData.
$('#workarea').on('click','#newqueryform input[type="submit"]', function(e){
var formData = $(this).closest('#newqueryform').serializeArray();
formData.push({name: this.name, value: this.value});
...