public/js/form.js
//goes through the loop to display items in array
goes through the loop to display items in array
goes through the loop to display items in array
function displayInfo(response) {
  var pets = response.petfinder.pets
  if (pets.pet.length > 0){
    pets = pets.pet;
    for (each in pets){
      let pet = pets[each]
      imgSrc = findPicture(pet.media.photos.photo);
      $("#reviews").append("<div class='displayDog'><img src='"+imgSrc+"'><p>Name: <strong>"+pet.name['$t']+"</strong></br>Breed: "+pet.breeds.breed['$t']+"</br>Sex: "+pet.sex['$t']+"</br>Size: "+pet.size['$t']+"<br>Age: "+pet.age['$t']+"<br>"+pet.contact.email['$t']+"</p></div>");
    }
  }
}
function displayInfo ( response ) { var pets = response . petfinder . pets if ( pets . pet . length > 0 ) { pets = pets . pet ; for ( each in pets ) { let pet = pets [ each ] imgSrc = findPicture ( pet . media . photos . photo ) ; $ ( "#reviews" ) . append ( "<div class='displayDog'><img src='" + imgSrc + "'><p>Name: <strong>" + pet . name [ '$t' ] + "</strong></br>Breed: " + pet . breeds . breed [ '$t' ] + "</br>Sex: " + pet . sex [ '$t' ] + "</br>Size: " + pet . size [ '$t' ] + "<br>Age: " + pet . age [ '$t' ] + "<br>" + pet . contact . email [ '$t' ] + "</p></div>" ) ; } } }
goes through the loop to display items in array
goes through the loop to display items in array