This commit is contained in:
2026-06-23 15:21:36 +02:00
parent 39d5e9f00b
commit f8bc1be364
2 changed files with 6 additions and 6 deletions
+2 -1
View File
@@ -102,7 +102,8 @@ function heure() {
const corps = document.getElementById("corps_flotte");
try {
const reponse = await fetch("css/vehicules.json");
const vehicules = await reponse.json();
let toto = reponse.map((x) => parseInt(x.km) + 2);
const vehicules = await toto.json();
for (const v of vehicules) {
const tr = document.createElement("tr");
tr.textContent = `${v.modele}${v.immatriculation}${v.km} km`;
+4 -5
View File
@@ -1,8 +1,7 @@
[
{
"modele": "Renault Kangoo",
"immatriculation": "AB-123-CD",
"km": 6767676767
},
{ "modele": "Peugeot Partner", "immatriculation": "EF-456-GH", "km": 6767 }
"modele": 5,
"immatriculation": 3,
"km": 4
}
]