When I try running the URL in Chrome, the output I receive is:
{
"Train_score": {
"0": 0.9892473118
},
"Test_score": {
"0": 0.9831932773
}
}
However, when I attempt to use the following code to retrieve the JSON data using Javascript,
const fetch = require("node-fetch");
var obj
fetch(`url`)
.then(res => res.json())
.then(data => obj = data)
.then(() => console.log(obj))
.catch(err => console.error(err));
The output I get is:
Object {Train_score: Object, Test_score: Object}
.
I am puzzled as to why it's not displaying the numerical value. My code is being run in VSCode.