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