Using JSON object, it is possible and the code sample is
$('#Myform').attr('onsubmit', 'test()');
function test() {
var obj = {};
obj.title =$('#title').prop('value');
console.log('title: '+obj.title);
obj.userID =$('#userID').prop('value');
console.log('userID: '+obj.website);
obj.passCode =$('#passCode').prop('value').split(',');
console.log('passCode: '+obj.tags);
doSomething(JSON.stringify(obj));
}