I've seen this technique many time on other questions to make an AJAX POST:
var postData = $('#my-form').serializeObject();
$.post(url, postData, function(){});
But what I want to do is this.
var data = {name1: 'value1', name2: 'value2'};
$.post(url, data, function(){});
And this is producing the error:
TypeError: undefined is not a function (near '...$.ajax...')
What technique allows me to post non-DOM objects as HTTP form data?