Skip to content

Commit

Permalink
up pirlotv
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitonika committed Jan 17, 2023
1 parent 1c9b6aa commit 7d5449b
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions src/prlotv.fr/pirlo.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,32 @@ async function get() {
data: bodyFormData,
headers: { "Content-Type": "multipart/form-data" },
};
let respuesta = await axios(optionsJson);
console.log(respuesta.data.Text);
let response = await axios(optionsJson);
let estado = response.data.Text;
estado = JSON.parse(estado);
let match = [];
for (let x in estado) {
for (let y in estado[x]) {
if (estado[x].Column3) {
match.push(estado[x].Column3);
break;
}
}
}
let result = match.filter((item, index) => {
return match.indexOf(item) === index;
});
let tournamet = [];
let game = [];
let all = [];
for (let t in result) {
let elSplit = result[t];
all = elSplit.split(": ");
tournamet.push(all[0]);
game.push(all[1]);
}
return {
data: "elJson",
data: game,
status: 200,
};
} catch (error) {
Expand Down

0 comments on commit 7d5449b

Please sign in to comment.