I'm trying to pull data from the Petfinder API. I get a good response and can see the properties available but as soon as I try and access the pets property I get an error. I'm grabbing the promise fine but clearly messing up somewhere else. Hoping someone can help me figure out what i'm doing wrong.
Here is the code and what the promise returns
console.log(this.props.pets.petfinder)
Here is the code that causes the error
console.log(this.props.pets.petfinder.pets)
Here is the action that is calling the api
export const getPets = () => {
const myInits = {
method: 'GET',
mode: 'no-cors'
}
const promise = axios.get('http://api.petfinder.com/pet.find?key=mykey&format=json&location=85282', myInits)
return {
type: GET_PETS,
payload: promise
}
}

