0
You can use statusTranslate == "Y" ? objSportIDLanguange[i] : objSport[i] this will return objSportIDLanguange value if Y else other value then pass this to your div . Demo Code : var wantToShow = ['Football', 'Rugby', 'Tennis', 'Badminton', 'Fishing']; //without hiking var objSport = ['Footb...