I am using Axios to make a get request to a Jobs API site. Whenever I console.log the response, I can't seem to use it. The object that comes back is {data: "↵ ↵ ↵ ↵"}, but it looks like JSON.
const url = //api string content
axios.get(url)
.then(function(res){
console.log(res);
})
.catch(function(){
console.log("err");
})
If I console.log(res.data), then it doesn't come back parsed in JSON. It looks like it's returning a function with all the data. It looks like displayJobs({"keys": "values"}). I can't get res.data.displayJobs. When I go directly to the link, my JSON viewer parses it normal. How can I get the data to come back as JSON format? ex: res.data.jobTitle
Thank you for any help. I've had a few successful API requests on other projects, but I am still fairly new so I hope this isn't a dumb question.