0
I would like to upload a list of my JSON file to use in my Javascript , to use the.table() console with the provided information ,
This is my Javascript code :
fetch("infos.json") // especifique o caminho
.then(response => response.json())
.then(json => console.table(json))
And this is JSON’s :
{"Jogadores":[{"Jogador":"Player1","Pontuação":"15 pnts"},{"Jogador":"Player2","Pontuação":"12,3 pnts"},{"Jogador":"Player3","Pontuação":"11,6 pnts"},{"Jogador":"Player4","Pontuação":"11,2 pnts"}]}
What error is generating?
– Augusto Vasques
Sorry I went to see you have a character error in JSON !
– Vitor Henrique05
I’m new to the script
– Vitor Henrique05
JSON error : Syntaxerror: JSON.parse: Unexpected non-whitespace Character after JSON data at line 1 column 10 of the JSON data .
– Vitor Henrique05
Add the error directly to the question.
– Boneco Sinforoso