I am using web scraper api to get title, image and description of different websites. The thing I want to do is to get images with a specific format.. e.g. only get images that has jpg format extension .. I am trying to do that using js with if else.. here is the code and is not working
if(!(image.src == '[src*=".jpg"]')){
console.log('No pic')
}else{
image.src = data.image;
}