Here I want to do which are the variable not empty, I want to pass that variable one in data,in this case area is empty so I want pass the parameter for city and listing type, but I don't know how to do?
var city = "Karnadaka";
var area = "";
var listing type = "RENT";
$.ajax({
type: 'GET',
url: "http://www.domain.com/api/get/searchProperties",
data: {
area: area,
city: city,
listingType: listing_type
},
success: function(data) {
console.log(data);
}
});