I have an array of objects with an ImageUrl and a ThumbUrl. If the ThumbUrl is null i want it replaced with the ImageUrl. I have this but its not working:
$.each(results.Photos, function(i, pic){
pic.ImageThumbUrl == null ? pic.ImageUrl;
topicsPhoto.push({
picUrl: pic.ImageUrl,
picThumb: pic.ImageThumbUrl,
picDescription: pic.Description
});
});
or just when pushing into the array: