Api响应在下面给出[{“ productId”:928,“ hotelId”:0,“ productName”:“ Loc 5”,“ country”:“ India”,“ city”:“ Bangalore”,“ locality”: “”,...
let response = JSON.parse(*YourResponse*).locality;
if(response === ""){
response = "SELECT";
}
element.innerHTML += response;