0👍
You are not creating the same type of array on customer.php as you are on data.php. Replace your while loop in customers with the below and you should have the same format of JSON.
while(mysqli_stmt_fetch($stmt)) {
$data[] = array('bdi' => $bdi, 'date' => $date);
}
Source:stackexchange.com