It is possible to make something like this?
$.ajax({
url: "test.php",
success: function(json, json1){ //Question here, can i have more than one?
$m0 = [];
$m0.push(parseFloat(json));
alert($m0); //show 750
$m1 = [];
$m1.push(parseFloat(json1));
alert($m1); // show 320
}
});
and what is expected return in json?
this for example? [750, 320] or this [750] [320]?
I don’t think this is possible; JSON generally includes only a single top-level value. The standard approach would be to have
test.phpreturn a JSON array of two values:Your load function would then look like this: