0👍
In your php code
$res1 = $sqlStmt->fetchAll();
$res2 = $sqlStmt2->fetchAll(); // Assuming u have executed 2nd query.
$res['income'] = $res1;
$res['outcome'] = $res2;
echo json_encode($res);
Your Ajax Success
success:function(res){
$incomeData = res['income'];
$outcomeData = res['outcome'];
}
Source:stackexchange.com