What is your hint or solution suggestion?
I decided to just replace the
https://www.freecodecamp.org/json/cats.json to eliminate any potential issue with the API.
After I was able to access the data I realized that I was wrong in trying to collect the data. I was approaching it like this:
console.log(json.codeNames). Even if the API was working this naturally returns undefined.
So like the title of this thread says, read the task very literally verbatim:
Challenge: Access the JSON Data from an API
For the cat with the "id" of 2, print to the console the second value in the codeNames array. You should use bracket and dot notation on the object (which is saved in the variable json) to access the value.
After reading this a few times it made sense to me what I was doing wrong.
Link to the challenge: