I am trying to extract JSON data from an api, but running into issues. When I console.log the data, it shows...
I am trying to access name from the returned json object.I tried to log json.(whatever) from the object and is shows undefined.
const fetchData = async () => {
const response = await fetch('http://swapi.dev/api/vehicles/30/')
const json = response.json();
console.log(json);
}
fetchData();
