This is how i handle this situation in JS :
var txt = response.data[i].message;
if(txt==null){
txt = response.data[i].story;
}
alert(txt);
In your case, you can "continue" the loop if 'message' is null.
This is how i handle this situation in JS :
var txt = response.data[i].message;
if(txt==null){
txt = response.data[i].story;
}
alert(txt);
In your case, you can "continue" the loop if 'message' is null.