Your call to resp.json() is one method of calling a json decode. It’s a javascript/API basic since the data is returned as a string and has to be parsed for use, it’s a bit of a fundamental
You probably need to do
.then(function(resp)
{
return resp.json();
})
.then(function(resp)
{
console.log(resp);
})
To solve the issue you are having.
I’m not sure what the issue is as all you are doing is logging the output not parsing/using it at all.