Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
152
rated 0 times [  159] [ 7]  / answers: 1 / hits: 72831  / 16 Years ago, sun, february 8, 2009, 12:00:00

I've got a json encoded dataset that I retrieve via ajax. Some of the data points I'm trying to retrieve will come back us null or empty.



However, I don't want those null or empty to be displayed to the end user, or passed on to other functions.



What I'm doing now is checking for




if(this.cityState!='null'){
// do some stuff here
}


However, for each line I find myself going through multiple if statements, and it seems very inefficient. Is there a better way to do this?


More From » json

 Answers
There are no answers for this question yet.
Only authorized users can answer the question. Please sign in first, or register a free account.
sylviakaitlinj

Total Points: 564
Total Questions: 114
Total Answers: 105

Location: Jordan
Member since Thu, Aug 11, 2022
2 Years ago
sylviakaitlinj questions
;