i have the JSON API
if the JSON has a data will respond
"demo":demo1,"simple":{"simpledata":1,
}
if the JSON has a nodata will respond
"simple":{"simpledata":1,
}
how can I display no data ?
i have the JSON API
if the JSON has a data will respond
"demo":demo1,"simple":{"simpledata":1,
}
if the JSON has a nodata will respond
"simple":{"simpledata":1,
}
how can I display no data ?
That will probably work for you. But if your JSON ever gets more complicated than that, you may get a false positive (true) because that’s going to search the entire JSON response for your search key (“demo1”) and if it finds it anywhere, it will return true.