@infinityskyline
One way I can think of is, If the values of score, team are stored in node, then get the form action attribute and hit with .json extension and read the values of score and team.
$.ajax({
url: $("form.cq-dialog").attr("action") + ".json",
async: false,
success: function (data) {
console.log(data.score);
}
});
One more way is, if you use Sling Model (I see you are using Use API here in example) and even if values of score, team are not stored as part of node you can hit the same action attr path with model selector and JSON extension you can get values.
$.ajax({
url: $("form.cq-dialog").attr("action") + ".model.json",
async: false,
success: function (data) {
console.log(data.score);
}
});