When using $.ajax you can see that it uses javascript objects to handle everything. The data property you set wants another javascript object.
data:{data:data, id:id}
$.ajax({
type: "POST",
url: "http://example.url.tosendto",
data: { data: data, id: id} // Data property of the object wants another javascript object
})
.done(function( msg ) {
alert( "Data Saved: " + msg );
});