I tried to use jQuery to do jQuery.parseJSON and JSON.stringify to take a JSON response and I can't seem to get data that is named as label.
{
"message":"Success",
"result":
[
{
"prediction":
[
{
"label":"Anta",
"probability":0.095694885
},
{
"label":"Mice",
"probability":0.9043051
}
]
}
]
}
I'm trying to use ajax to take the request and try to use it as so:
function success(name) {
var json = jQuery.parseJSON(name);
var jsons = JSON.stringify(name);
console.log(json.result['prediction'].label);
},
console.log(json.result['prediction'][0].label);?