UPDATE graph from receiptDetails.json. ajax to obtain an array