Check the code.
$(function () {
var saveData = {
teams: [
["Team 1", "Team 2"],
["Team 3", null],
["Team 4", null],
["Team 5", null]
],
results: [
[
[[1, 0], [null, null], [null, null], [null, null]],
[[null, null], [1, 4]],
[[null, null], [null, null]]
]
]
};
var container = $('#save');
container.bracket({
init: saveData,
save: function (data, userData) {
jQuery.ajax("URL" + userData, {
contentType: 'application/json',
dataType: 'json',
type: 'post',
data: json
})
}
});
})