JSFiddle - React, Tailwind, and code Playground

JavaScript

var data = {
    a: 1,
    b: 2
};

var xhr = $.ajax('http://www.bennadel.com/blog/2119-jQuery-Does-Not-Post-Undefined-Values-In-AJAX-Requests.htm',{
    type: 'post',
    data: {
        a: data.a,
        b: data.b,
        c: data.c
    },
    success: function( response ){
        console.log( this, arguments );
    }
});